Skip to content

Commit cd91992

Browse files
committed
[ARM] Convert test to opaque pointers
When converting this test to opaque pointers, we get a register move between the call and the inline asm. However, the test comment specifically says that there should be nothing between them. As far as I can tell, this is fine, both in that the inline asm doesn't use the relevant registers, but also more generally because the inline asm doesn't declare any clobbers, so really LLVM can do whatever, side effects or not. The test was added by 618ce3e with only a reference to Apple's internal issue tracker. Differential Revision: https://reviews.llvm.org/D147512
1 parent 86946eb commit cd91992

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed
Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,30 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2-
; RUN: llc -opaque-pointers=0 -fast-isel < %s | FileCheck %s
2+
; RUN: llc -fast-isel < %s | FileCheck %s
33
target datalayout = "e-m:o-p:32:32-i1:8:32-i8:8:32-i16:16:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
44
target triple = "thumbv7-apple-ios5.0.0"
55

66
%0 = type opaque
77

8-
; Make sure that the inline asm starts right after the call to bar.
9-
define void @test_inline_asm_sideeffect(%0* %call) {
8+
; Make sure that there are no unexpected instructions between the call to bar
9+
; and the inline asm.
10+
define void @test_inline_asm_sideeffect(ptr %call) {
1011
; CHECK-LABEL: test_inline_asm_sideeffect:
1112
; CHECK: @ %bb.0:
1213
; CHECK-NEXT: push {r4, r7, lr}
1314
; CHECK-NEXT: add r7, sp, #4
1415
; CHECK-NEXT: mov r4, r0
1516
; CHECK-NEXT: bl _bar
17+
; CHECK-NEXT: mov r0, r4
1618
; CHECK-NEXT: @ InlineAsm Start
1719
; CHECK-NEXT: mov r7, r7 @ marker
1820
; CHECK-NEXT: @ InlineAsm End
19-
; CHECK-NEXT: movw r0, :lower16:(L_foo$non_lazy_ptr-(LPC0_0+4))
20-
; CHECK-NEXT: movt r0, :upper16:(L_foo$non_lazy_ptr-(LPC0_0+4))
21-
; CHECK-NEXT: LPC0_0:
22-
; CHECK-NEXT: add r0, pc
23-
; CHECK-NEXT: ldr r1, [r0]
24-
; CHECK-NEXT: mov r0, r4
25-
; CHECK-NEXT: blx r1
21+
; CHECK-NEXT: bl _foo
2622
; CHECK-NEXT: pop {r4, r7, pc}
2723
call void @bar()
2824
call void asm sideeffect "mov\09r7, r7\09\09@ marker", ""()
29-
%1 = call %0* bitcast (i8* (i8*)* @foo to %0* (%0*)*)(%0* %call)
25+
%1 = call ptr @foo(ptr %call)
3026
ret void
3127
}
3228

33-
declare i8* @foo(i8*)
29+
declare ptr @foo(ptr)
3430
declare void @bar()

0 commit comments

Comments
 (0)