diff options
Diffstat (limited to 'test/CodeGen/X86/statepoint-stackmap-format.ll')
| -rw-r--r-- | test/CodeGen/X86/statepoint-stackmap-format.ll | 96 |
1 files changed, 47 insertions, 49 deletions
diff --git a/test/CodeGen/X86/statepoint-stackmap-format.ll b/test/CodeGen/X86/statepoint-stackmap-format.ll index e18476cee53c..4f8b2ce6efd9 100644 --- a/test/CodeGen/X86/statepoint-stackmap-format.ll +++ b/test/CodeGen/X86/statepoint-stackmap-format.ll @@ -1,5 +1,5 @@ ; RUN: llc < %s -mtriple="x86_64-pc-linux-gnu" | FileCheck %s -; RUN: llc < %s -mtriple="x86_64-pc-win64-coff" | FileCheck %s +; RUN: llc < %s -mtriple="x86_64-pc-unknown-elf" | FileCheck %s ; This test is a sanity check to ensure statepoints are generating StackMap ; sections correctly. This is not intended to be a rigorous test of the @@ -11,7 +11,7 @@ declare zeroext i1 @return_i1() define i1 @test(i32 addrspace(1)* %ptr_base, i32 %arg) gc "statepoint-example" { -; CHECK-LABEL: test +; CHECK-LABEL: test: ; Do we see two spills for the local values and the store to the ; alloca? ; CHECK: subq $40, %rsp @@ -25,11 +25,11 @@ entry: %metadata1 = alloca i32 addrspace(1)*, i32 2, align 8 store i32 addrspace(1)* null, i32 addrspace(1)** %metadata1 %ptr_derived = getelementptr i32, i32 addrspace(1)* %ptr_base, i32 %arg - %safepoint_token = tail call i32 (i64, i32, i1 ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i1f(i64 0, i32 0, i1 ()* @return_i1, i32 0, i32 0, i32 0, i32 2, i32 addrspace(1)* %ptr_base, i32 addrspace(1)* null, i32 addrspace(1)* %ptr_base, i32 addrspace(1)* %ptr_derived, i32 addrspace(1)* null) - %call1 = call zeroext i1 @llvm.experimental.gc.result.i1(i32 %safepoint_token) - %a = call i32 addrspace(1)* @llvm.experimental.gc.relocate.p1i32(i32 %safepoint_token, i32 9, i32 9) - %b = call i32 addrspace(1)* @llvm.experimental.gc.relocate.p1i32(i32 %safepoint_token, i32 9, i32 10) - %c = call i32 addrspace(1)* @llvm.experimental.gc.relocate.p1i32(i32 %safepoint_token, i32 11, i32 11) + %safepoint_token = tail call token (i64, i32, i1 ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i1f(i64 0, i32 0, i1 ()* @return_i1, i32 0, i32 0, i32 0, i32 2, i32 addrspace(1)* %ptr_base, i32 addrspace(1)* null, i32 addrspace(1)* %ptr_base, i32 addrspace(1)* %ptr_derived, i32 addrspace(1)* null) + %call1 = call zeroext i1 @llvm.experimental.gc.result.i1(token %safepoint_token) + %a = call i32 addrspace(1)* @llvm.experimental.gc.relocate.p1i32(token %safepoint_token, i32 9, i32 9) + %b = call i32 addrspace(1)* @llvm.experimental.gc.relocate.p1i32(token %safepoint_token, i32 9, i32 10) + %c = call i32 addrspace(1)* @llvm.experimental.gc.relocate.p1i32(token %safepoint_token, i32 11, i32 11) ; ret i1 %call1 } @@ -53,11 +53,11 @@ define i1 @test_derived_arg(i32 addrspace(1)* %ptr_base, entry: %metadata1 = alloca i32 addrspace(1)*, i32 2, align 8 store i32 addrspace(1)* null, i32 addrspace(1)** %metadata1 - %safepoint_token = tail call i32 (i64, i32, i1 ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i1f(i64 0, i32 0, i1 ()* @return_i1, i32 0, i32 0, i32 0, i32 2, i32 addrspace(1)* %ptr_base, i32 addrspace(1)* null, i32 addrspace(1)* %ptr_base, i32 addrspace(1)* %ptr_derived, i32 addrspace(1)* null) - %call1 = call zeroext i1 @llvm.experimental.gc.result.i1(i32 %safepoint_token) - %a = call i32 addrspace(1)* @llvm.experimental.gc.relocate.p1i32(i32 %safepoint_token, i32 9, i32 9) - %b = call i32 addrspace(1)* @llvm.experimental.gc.relocate.p1i32(i32 %safepoint_token, i32 9, i32 10) - %c = call i32 addrspace(1)* @llvm.experimental.gc.relocate.p1i32(i32 %safepoint_token, i32 11, i32 11) + %safepoint_token = tail call token (i64, i32, i1 ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i1f(i64 0, i32 0, i1 ()* @return_i1, i32 0, i32 0, i32 0, i32 2, i32 addrspace(1)* %ptr_base, i32 addrspace(1)* null, i32 addrspace(1)* %ptr_base, i32 addrspace(1)* %ptr_derived, i32 addrspace(1)* null) + %call1 = call zeroext i1 @llvm.experimental.gc.result.i1(token %safepoint_token) + %a = call i32 addrspace(1)* @llvm.experimental.gc.relocate.p1i32(token %safepoint_token, i32 9, i32 9) + %b = call i32 addrspace(1)* @llvm.experimental.gc.relocate.p1i32(token %safepoint_token, i32 9, i32 10) + %c = call i32 addrspace(1)* @llvm.experimental.gc.relocate.p1i32(token %safepoint_token, i32 11, i32 11) ; ret i1 %call1 } @@ -66,15 +66,15 @@ entry: define i1 @test_id() gc "statepoint-example" { ; CHECK-LABEL: test_id entry: - %safepoint_token = tail call i32 (i64, i32, i1 ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i1f(i64 237, i32 0, i1 ()* @return_i1, i32 0, i32 0, i32 0, i32 0) - %call1 = call zeroext i1 @llvm.experimental.gc.result.i1(i32 %safepoint_token) + %safepoint_token = tail call token (i64, i32, i1 ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i1f(i64 237, i32 0, i1 ()* @return_i1, i32 0, i32 0, i32 0, i32 0) + %call1 = call zeroext i1 @llvm.experimental.gc.result.i1(token %safepoint_token) ret i1 %call1 } -declare i32 @llvm.experimental.gc.statepoint.p0f_i1f(i64, i32, i1 ()*, i32, i32, ...) -declare i1 @llvm.experimental.gc.result.i1(i32) -declare i32 addrspace(1)* @llvm.experimental.gc.relocate.p1i32(i32, i32, i32) #3 +declare token @llvm.experimental.gc.statepoint.p0f_i1f(i64, i32, i1 ()*, i32, i32, ...) +declare i1 @llvm.experimental.gc.result.i1(token) +declare i32 addrspace(1)* @llvm.experimental.gc.relocate.p1i32(token, i32, i32) #3 ; CHECK-LABEL: .section .llvm_stackmaps ; CHECK-NEXT: __LLVM_StackMaps: @@ -94,18 +94,19 @@ declare i32 addrspace(1)* @llvm.experimental.gc.relocate.p1i32(i32, i32, i32) #3 ; CHECK-NEXT: .quad 40 ; CHECK-NEXT: .quad test_derived_arg ; CHECK-NEXT: .quad 40 +; CHECK-NEXT: .quad test_id +; CHECK-NEXT: .quad 8 ; ; test ; -; Large Constants -; Statepoint ID only -; CHECK: .quad 0 +; Statepoint ID +; CHECK-NEXT: .quad 0 ; Callsites ; Constant arguments -; CHECK: .long .Ltmp1-test +; CHECK-NEXT: .long .Ltmp1-test ; CHECK: .short 0 ; CHECK: .short 11 ; SmallConstant (0) @@ -123,8 +124,8 @@ declare i32 addrspace(1)* @llvm.experimental.gc.relocate.p1i32(i32, i32, i32) #3 ; CHECK: .byte 8 ; CHECK: .short 0 ; CHECK: .long 2 -; Direct Spill Slot [RSP+0] -; CHECK: .byte 2 +; Indirect Spill Slot [RSP+0] +; CHECK: .byte 3 ; CHECK: .byte 8 ; CHECK: .short 7 ; CHECK: .long 16 @@ -143,23 +144,23 @@ declare i32 addrspace(1)* @llvm.experimental.gc.relocate.p1i32(i32, i32, i32) #3 ; CHECK: .byte 8 ; CHECK: .short 0 ; CHECK: .long 0 -; Direct Spill Slot [RSP+16] -; CHECK: .byte 2 +; Indirect Spill Slot [RSP+16] +; CHECK: .byte 3 ; CHECK: .byte 8 ; CHECK: .short 7 ; CHECK: .long 16 -; Direct Spill Slot [RSP+8] -; CHECK: .byte 2 +; Indirect Spill Slot [RSP+8] +; CHECK: .byte 3 ; CHECK: .byte 8 ; CHECK: .short 7 ; CHECK: .long 8 -; Direct Spill Slot [RSP+16] -; CHECK: .byte 2 +; Indirect Spill Slot [RSP+16] +; CHECK: .byte 3 ; CHECK: .byte 8 ; CHECK: .short 7 ; CHECK: .long 16 -; Direct Spill Slot [RSP+16] -; CHECK: .byte 2 +; Indirect Spill Slot [RSP+16] +; CHECK: .byte 3 ; CHECK: .byte 8 ; CHECK: .short 7 ; CHECK: .long 16 @@ -171,15 +172,13 @@ declare i32 addrspace(1)* @llvm.experimental.gc.relocate.p1i32(i32, i32, i32) #3 ; ; test_derived_arg -; -; Large Constants -; Statepoint ID only -; CHECK: .quad 0 +; Statepoint ID +; CHECK-NEXT: .quad 0 ; Callsites ; Constant arguments -; CHECK: .long .Ltmp3-test_derived_arg +; CHECK-NEXT: .long .Ltmp3-test_derived_arg ; CHECK: .short 0 ; CHECK: .short 11 ; SmallConstant (0) @@ -192,8 +191,8 @@ declare i32 addrspace(1)* @llvm.experimental.gc.relocate.p1i32(i32, i32, i32) #3 ; CHECK: .byte 8 ; CHECK: .short 0 ; CHECK: .long 2 -; Direct Spill Slot [RSP+0] -; CHECK: .byte 2 +; Indirect Spill Slot [RSP+0] +; CHECK: .byte 3 ; CHECK: .byte 8 ; CHECK: .short 7 ; CHECK: .long 16 @@ -212,23 +211,23 @@ declare i32 addrspace(1)* @llvm.experimental.gc.relocate.p1i32(i32, i32, i32) #3 ; CHECK: .byte 8 ; CHECK: .short 0 ; CHECK: .long 0 -; Direct Spill Slot [RSP+16] -; CHECK: .byte 2 +; Indirect Spill Slot [RSP+16] +; CHECK: .byte 3 ; CHECK: .byte 8 ; CHECK: .short 7 ; CHECK: .long 16 -; Direct Spill Slot [RSP+8] -; CHECK: .byte 2 +; Indirect Spill Slot [RSP+8] +; CHECK: .byte 3 ; CHECK: .byte 8 ; CHECK: .short 7 ; CHECK: .long 8 -; Direct Spill Slot [RSP+16] -; CHECK: .byte 2 +; Indirect Spill Slot [RSP+16] +; CHECK: .byte 3 ; CHECK: .byte 8 ; CHECK: .short 7 ; CHECK: .long 16 -; Direct Spill Slot [RSP+16] -; CHECK: .byte 2 +; Indirect Spill Slot [RSP+16] +; CHECK: .byte 3 ; CHECK: .byte 8 ; CHECK: .short 7 ; CHECK: .long 16 @@ -239,13 +238,12 @@ declare i32 addrspace(1)* @llvm.experimental.gc.relocate.p1i32(i32, i32, i32) #3 ; CHECK: .align 8 ; Records for the test_id function: -; No large constants ; The Statepoint ID: -; CHECK: .quad 237 +; CHECK-NEXT: .quad 237 ; Instruction Offset -; CHECK: .long .Ltmp5-test_id +; CHECK-NEXT: .long .Ltmp5-test_id ; Reserved: ; CHECK: .short 0 |
