2016-10-04 05:58:20 +08:00
|
|
|
; RUN: llc -mtriple=hexagon-- -mcpu=hexagonv5 -relocation-model=pic < %s | FileCheck %s
|
2015-12-19 04:19:30 +08:00
|
|
|
|
2017-02-10 23:33:13 +08:00
|
|
|
; CHECK: r{{[0-9]+}} = add({{pc|PC}},##_GLOBAL_OFFSET_TABLE_@PCREL)
|
|
|
|
; CHECK: r{{[0-9]+}} = memw(r{{[0-9]+}}+##src@GOT)
|
|
|
|
; CHECK: r{{[0-9]+}} = memw(r{{[0-9]+}}+##dst@GOT)
|
2015-12-19 04:19:30 +08:00
|
|
|
|
|
|
|
@dst = external global i32
|
|
|
|
@src = external global i32
|
|
|
|
|
|
|
|
define i32 @foo() nounwind {
|
|
|
|
entry:
|
|
|
|
%0 = load i32, i32* @src, align 4, !tbaa !0
|
|
|
|
store i32 %0, i32* @dst, align 4, !tbaa !0
|
|
|
|
%call = tail call i32 @baz(i32 %0) nounwind
|
|
|
|
ret i32 0
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i32 @baz(i32)
|
|
|
|
|
|
|
|
!0 = !{!"int", !1}
|
|
|
|
!1 = !{!"omnipotent char", !2}
|
|
|
|
!2 = !{!"Simple C/C++ TBAA"}
|