[llvm] 85abedd - [TwoAddressInstruction] Pre-commit a test case for D110848
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 7 02:10:17 PDT 2021
Author: Jay Foad
Date: 2021-10-07T10:10:11+01:00
New Revision: 85abedd75074bf574e8b012883b5490674037093
URL: https://github.com/llvm/llvm-project/commit/85abedd75074bf574e8b012883b5490674037093
DIFF: https://github.com/llvm/llvm-project/commit/85abedd75074bf574e8b012883b5490674037093.diff
LOG: [TwoAddressInstruction] Pre-commit a test case for D110848
Added:
llvm/test/CodeGen/SystemZ/twoaddr-kill.mir
Modified:
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/SystemZ/twoaddr-kill.mir b/llvm/test/CodeGen/SystemZ/twoaddr-kill.mir
new file mode 100644
index 0000000000000..290f277d100a5
--- /dev/null
+++ b/llvm/test/CodeGen/SystemZ/twoaddr-kill.mir
@@ -0,0 +1,36 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+# RUN: llc -o - %s -verify-machineinstrs -mtriple=s390x-linux-gnu -mcpu=z196 -run-pass=livevars,twoaddressinstruction | FileCheck %s
+
+# FIXME: The COPY from [[COPY3]] is killed even though there is a subsequent use
+# of [[COPY3]] in the INLINEASM instruction.
+---
+name: f2
+tracksRegLiveness: true
+body: |
+ bb.0:
+ liveins: $r2l
+
+ ; CHECK-LABEL: name: f2
+ ; CHECK: liveins: $r2l
+ ; CHECK-NEXT: {{ $}}
+ ; CHECK-NEXT: [[COPY:%[0-9]+]]:gr32bit = COPY killed $r2l
+ ; CHECK-NEXT: [[COPY1:%[0-9]+]]:grh32bit = COPY [[COPY]]
+ ; CHECK-NEXT: $r2l = COPY [[COPY]]
+ ; CHECK-NEXT: $r3l = COPY killed [[COPY]]
+ ; CHECK-NEXT: [[COPY2:%[0-9]+]]:grh32bit = COPY killed [[COPY1]]
+ ; CHECK-NEXT: INLINEASM &"stepa $1, $2, $3", 0 /* attdialect */, 393226 /* regdef:GRH32Bit */, def [[COPY2]], 2147483657 /* reguse tiedto:$0 */, [[COPY2]](tied-def 3), 9 /* reguse */, killed $r2l, 9 /* reguse */, killed $r3l
+ ; CHECK-NEXT: [[COPY3:%[0-9]+]]:grh32bit = COPY killed [[COPY2]]
+ ; CHECK-NEXT: [[COPY4:%[0-9]+]]:grh32bit = COPY killed [[COPY3]]
+ ; CHECK-NEXT: INLINEASM &"stepb $1, $2", 0 /* attdialect */, 393227 /* regdef-ec:GRH32Bit */, def early-clobber [[COPY4]], 2147483657 /* reguse tiedto:$0 */, [[COPY4]](tied-def 3), 393225 /* reguse:GRH32Bit */, [[COPY3]]
+ ; CHECK-NEXT: $r2l = COPY killed [[COPY4]]
+ ; CHECK-NEXT: Return implicit killed $r2l
+ %0:gr32bit = COPY killed $r2l
+ %2:grh32bit = COPY %0
+ $r2l = COPY %0
+ $r3l = COPY killed %0
+ INLINEASM &"stepa $1, $2, $3", 0 /* attdialect */, 393226 /* regdef:GRH32Bit */, def %1:grh32bit, 2147483657 /* reguse tiedto:$0 */, killed %2(tied-def 3), 9 /* reguse */, killed $r2l, 9 /* reguse */, killed $r3l
+ %4:grh32bit = COPY killed %1
+ INLINEASM &"stepb $1, $2", 0 /* attdialect */, 393227 /* regdef-ec:GRH32Bit */, def early-clobber %3:grh32bit, 2147483657 /* reguse tiedto:$0 */, killed %4(tied-def 3), 393225 /* reguse:GRH32Bit */, %4
+ $r2l = COPY killed %3
+ Return implicit killed $r2l
+...
More information about the llvm-commits
mailing list