[llvm] 42d07bd - [X86] Pre-commit a test case for D110829
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 7 11:50:32 PDT 2021
Author: Jay Foad
Date: 2021-10-07T19:50:27+01:00
New Revision: 42d07bdc400f7acda912bfe889c4961b1413a6a4
URL: https://github.com/llvm/llvm-project/commit/42d07bdc400f7acda912bfe889c4961b1413a6a4
DIFF: https://github.com/llvm/llvm-project/commit/42d07bdc400f7acda912bfe889c4961b1413a6a4.diff
LOG: [X86] Pre-commit a test case for D110829
Added:
llvm/test/CodeGen/X86/twoaddr-mul2.mir
Modified:
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/X86/twoaddr-mul2.mir b/llvm/test/CodeGen/X86/twoaddr-mul2.mir
new file mode 100644
index 000000000000..f8f2e063d3e4
--- /dev/null
+++ b/llvm/test/CodeGen/X86/twoaddr-mul2.mir
@@ -0,0 +1,25 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+# RUN: llc -mtriple=x86_64-unknown -mcpu=haswell -run-pass=twoaddressinstruction %s -o - | FileCheck %s
+
+# FIXME: The killed flag should be on the second COPY from [[COPY]], not the first one.
+---
+name: test_mul_by_2
+tracksRegLiveness: true
+body: |
+ bb.0:
+ liveins: $edi
+
+ ; CHECK-LABEL: name: test_mul_by_2
+ ; CHECK: liveins: $edi
+ ; CHECK-NEXT: {{ $}}
+ ; CHECK-NEXT: [[COPY:%[0-9]+]]:gr32 = COPY killed $edi
+ ; CHECK-NEXT: undef %2.sub_32bit:gr64 = COPY killed [[COPY]]
+ ; CHECK-NEXT: undef %3.sub_32bit:gr64_nosp = COPY [[COPY]]
+ ; CHECK-NEXT: [[LEA64_32r:%[0-9]+]]:gr32 = LEA64_32r killed %2, 1, killed %3, 0, $noreg
+ ; CHECK-NEXT: $eax = COPY killed [[LEA64_32r]]
+ ; CHECK-NEXT: RET 0, killed $eax
+ %0:gr32 = COPY killed $edi
+ %1:gr32 = ADD32rr killed %0, %0, implicit-def dead $eflags
+ $eax = COPY killed %1
+ RET 0, killed $eax
+...
More information about the llvm-commits
mailing list