summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-10-28 01:13:53 +0000
committerDan Gohman <gohman@apple.com>2009-10-28 01:13:53 +0000
commit4b46cbfc23f279c860eaa72f9ac75830b47527be (patch)
tree1c44f3dfa5954726de61d71ba8be364418527831 /llvm/test
parent75d6a4afd29f93e3cd40bff7bf374e594da515d6 (diff)
downloadbcm5719-llvm-4b46cbfc23f279c860eaa72f9ac75830b47527be.tar.gz
bcm5719-llvm-4b46cbfc23f279c860eaa72f9ac75830b47527be.zip
Mark dead physregdefs dead immediately. This helps MachineSink and
MachineLICM and other things which run before LiveVariables is run. llvm-svn: 85360
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/X86/sink-hoist.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/sink-hoist.ll b/llvm/test/CodeGen/X86/sink-hoist.ll
index 4042a095c6c..7f6366972a9 100644
--- a/llvm/test/CodeGen/X86/sink-hoist.ll
+++ b/llvm/test/CodeGen/X86/sink-hoist.ll
@@ -41,3 +41,18 @@ bb:
return:
ret void
}
+
+; Sink instructions with dead EFLAGS defs.
+
+; CHECK: je
+; CHECK-NEXT: orb
+
+define zeroext i8 @zzz(i8 zeroext %a, i8 zeroext %b) nounwind readnone {
+entry:
+ %tmp = zext i8 %a to i32 ; <i32> [#uses=1]
+ %tmp2 = icmp eq i8 %a, 0 ; <i1> [#uses=1]
+ %tmp3 = or i8 %b, -128 ; <i8> [#uses=1]
+ %tmp4 = and i8 %b, 127 ; <i8> [#uses=1]
+ %b_addr.0 = select i1 %tmp2, i8 %tmp4, i8 %tmp3 ; <i8> [#uses=1]
+ ret i8 %b_addr.0
+}
OpenPOWER on IntegriCloud