|
1 |
| -; RUN: llc < %s -mtriple=thumb-apple-darwin -relocation-model=pic -no-integrated-as | FileCheck %s -check-prefix=PIC |
| 1 | +; RUN: cp %s %t.pic.ll |
| 2 | +; RUN: echo -e '!llvm.module.flags = !{!0}\n!0 = !{i32 7, !"PIC Level", i32 2}' >> %t.pic.ll |
| 3 | +; RUN: llc < %t.pic.ll -mtriple=thumb-apple-darwin -relocation-model=pic -no-integrated-as | FileCheck %s -check-prefix=PIC |
2 | 4 | ; RUN: llc < %s -mtriple=thumb-apple-darwin -relocation-model=static -no-integrated-as | FileCheck %s -check-prefix=NO-PIC -check-prefix=STATIC
|
3 | 5 | ; RUN: llc < %s -mtriple=thumb-apple-darwin -relocation-model=dynamic-no-pic -no-integrated-as | FileCheck %s -check-prefix=NO-PIC -check-prefix=DYNAMIC-NO-PIC
|
4 | 6 |
|
|
19 | 21 | ;NO-PIC: add [[SAVED_GUARD:r[0-9]+]], sp, #904
|
20 | 22 | ;NO-PIC-NEXT: ldr [[SAVED_GUARD]], [[[SAVED_GUARD]], #124]
|
21 | 23 | ;NO-PIC-NEXT: ldr [[ORIGINAL_GUARD:r[0-9]+]], [[ORIGINAL_GUARD_LABEL:LCPI[0-9_]+]]
|
22 |
| -;NO-PIC-NOT: LPC |
| 24 | +;DYNAMIC-NO-PIC: add [[ORIGINAL_GUARD]], pc |
23 | 25 | ;NO-PIC-NEXT: ldr [[ORIGINAL_GUARD]], [[[ORIGINAL_GUARD]]]
|
24 | 26 | ;DYNAMIC-NO-PIC-NEXT: ldr [[ORIGINAL_GUARD]], [[[ORIGINAL_GUARD]]]
|
25 | 27 | ;NO-PIC-NEXT: cmp [[ORIGINAL_GUARD]], [[SAVED_GUARD]]
|
@@ -49,6 +51,3 @@ declare void @foo3(ptr)
|
49 | 51 | declare void @llvm.lifetime.end.p0(i64, ptr nocapture)
|
50 | 52 |
|
51 | 53 | attributes #0 = { nounwind ssp "less-precise-fpmad"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
|
52 |
| - |
53 |
| -!llvm.module.flags = !{!0} |
54 |
| -!0 = !{i32 7, !"PIC Level", i32 2} |
0 commit comments