[llvm] e99e821 - [FixupStatepoints] Precommit test for D127308. NFC
Denis Antrushin via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 9 03:05:43 PDT 2022
Author: Denis Antrushin
Date: 2022-06-09T17:04:48+07:00
New Revision: e99e821ce88999f5c528c19da6503c0912c0081e
URL: https://github.com/llvm/llvm-project/commit/e99e821ce88999f5c528c19da6503c0912c0081e
DIFF: https://github.com/llvm/llvm-project/commit/e99e821ce88999f5c528c19da6503c0912c0081e.diff
LOG: [FixupStatepoints] Precommit test for D127308. NFC
Added:
llvm/test/CodeGen/X86/statepoint-fixup-copy-prop.mir
Modified:
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/X86/statepoint-fixup-copy-prop.mir b/llvm/test/CodeGen/X86/statepoint-fixup-copy-prop.mir
new file mode 100644
index 0000000000000..523005566ec77
--- /dev/null
+++ b/llvm/test/CodeGen/X86/statepoint-fixup-copy-prop.mir
@@ -0,0 +1,45 @@
+# RUN: not --crash llc -o - %s -run-pass fixup-statepoint-caller-saved -verify-machineinstrs 2>&1 | FileCheck %s
+
+--- |
+ target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
+ target triple = "x86_64-pc-linux-gnu"
+
+ declare void @foo(i64)
+
+ define i8 addrspace(1)* @test_cp(i64 %a, i64 %b, i64 %c, i8 addrspace(1)* %p) gc "statepoint-example" {
+ ret i8 addrspace(1)* undef
+ }
+...
+---
+name: test_cp
+alignment: 16
+tracksRegLiveness: true
+liveins:
+ - { reg: '$rdi', virtual-reg: '' }
+frameInfo:
+body: |
+ bb.0:
+ liveins: $rax, $rdi, $rbp
+
+
+ ; CHECK: # After Fixup Statepoint Caller Saved
+ ; CHECK: # Machine code for function test_cp:
+ ; CHECK: bb.0:
+ ; CHECK: liveins: $rax, $rdi, $rbp
+ ; CHECK: renamable $rdi = COPY killed renamable $rax
+ ; CHECK: MOV64mr %stack.1, 1, $noreg, 0, $noreg, killed $rax :: (store (s64) into %stack.1)
+ ; CHECK: renamable $rax = MOV64rm renamable $rdi, 1, $noreg, 16, $noreg
+ ; CHECK: MOV64mr %stack.0, 1, $noreg, 0, $noreg, killed $rax :: (store (s64) into %stack.0)
+ ; CHECK: STATEPOINT 0, 0, 0, @foo, 2, 0, 2, 0, 2, 1, 1, 8, %stack.0, 0, 2, 1, 1, 8, %stack.1, 0, 2, 0, 2, 1, 0, 0, <regmask $bh $bl $bp $bph $bpl $bx $ebp $ebx $hbp $hbx $rbp $rbx $r12 $r13 $r14 $r15 $r12b $r13b $r14b $r15b $r12bh $r13bh $r14bh $r15bh $r12d $r13d $r14d $r15d $r12w $r13w $r14w $r15w $r12wh and 3 more...>, implicit-def $rsp, implicit-def $ssp
+ ; CHECK: *** Bad machine code: Using an undefined physical register ***
+ ; CHECK: - function: test_cp
+ ; CHECK: - basic block: %bb.0
+ ; CHECK: - instruction: MOV64mr %stack.1, 1, $noreg, 0, $noreg, killed $rax :: (store (s64) into %stack.1)
+ ; CHECK: - operand 5: killed $rax
+ ; CHECK: LLVM ERROR: Found 1 machine code errors.
+ renamable $rdi = COPY killed renamable $rax
+ renamable $rax = MOV64rm renamable $rdi, 1, $noreg, 16, $noreg
+ renamable $rdi = STATEPOINT 0, 0, 0, @foo, 2, 0, 2, 0, 2, 1, renamable $rax, 2, 1, killed renamable $rdi(tied-def 0), 2, 0, 2, 1, 0, 0, csr_64, implicit-def $rsp, implicit-def $ssp
+ $rax = COPY killed renamable $rdi
+ RET 0, killed $rax
+...
More information about the llvm-commits
mailing list