summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
authorMichael Kuperstein <mkuper@google.com>2016-07-15 22:31:14 +0000
committerMichael Kuperstein <mkuper@google.com>2016-07-15 22:31:14 +0000
commitbe2e3f5ce55e5563d8e21fcd707bd563ddda77ee (patch)
treeec24883063c9e38d43e763442960e6780b8c39b5 /llvm/test/CodeGen
parentcfb51f54ba8033a507a985763f0e7fc1b9b6d69f (diff)
downloadbcm5719-llvm-be2e3f5ce55e5563d8e21fcd707bd563ddda77ee.tar.gz
bcm5719-llvm-be2e3f5ce55e5563d8e21fcd707bd563ddda77ee.zip
ExpandPostRAPseudos should transfer implicit uses, not only implicit defs
Previously, we would expand: %BL<def> = COPY %DL<kill>, %EBX<imp-use,kill>, %EBX<imp-def> Into: %BL<def> = MOV8rr %DL<kill>, %EBX<imp-def> Dropping the imp-use on the floor. That confused CriticalAntiDepBreaker, which (correctly) assumes that if an instruction defs but doesn't use a register, that register is dead immediately before the instruction - while in this case, the high lanes of EBX can be very much alive. This fixes PR28560. Differential Revision: https://reviews.llvm.org/D22425 llvm-svn: 275634
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/ARM/twoaddrinstr.ll1
-rw-r--r--llvm/test/CodeGen/X86/pr28560.ll13
2 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/twoaddrinstr.ll b/llvm/test/CodeGen/ARM/twoaddrinstr.ll
index 97a49334b74..f0a95c833c6 100644
--- a/llvm/test/CodeGen/ARM/twoaddrinstr.ll
+++ b/llvm/test/CodeGen/ARM/twoaddrinstr.ll
@@ -5,6 +5,7 @@ define void @PR13378() nounwind {
; This was orriginally a crasher trying to schedule the instructions.
; CHECK-LABEL: PR13378:
; CHECK: vld1.32
+; CHECK-NEXT: vmov.i32
; CHECK-NEXT: vst1.32
; CHECK-NEXT: vst1.32
; CHECK-NEXT: vmov.f32
diff --git a/llvm/test/CodeGen/X86/pr28560.ll b/llvm/test/CodeGen/X86/pr28560.ll
new file mode 100644
index 00000000000..d0061f670cf
--- /dev/null
+++ b/llvm/test/CodeGen/X86/pr28560.ll
@@ -0,0 +1,13 @@
+; RUN: llc -mtriple=i686-pc-linux -print-after=postrapseudos < %s 2>&1 | FileCheck %s
+
+; CHECK: MOV8rr %{{[A-D]}}L, %E[[R:[A-D]]]X<imp-use,kill>, %E[[R]]X<imp-def>
+define i32 @foo(i32 %i, i32 %k, i8* %p) {
+ %f = icmp ne i32 %i, %k
+ %s = zext i1 %f to i8
+ %ret = zext i1 %f to i32
+ br label %next
+next:
+ %d = add i8 %s, 5
+ store i8 %d, i8* %p
+ ret i32 %ret
+}
OpenPOWER on IntegriCloud