diff options
author | Dan Gohman <gohman@apple.com> | 2009-10-28 01:13:53 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-10-28 01:13:53 +0000 |
commit | a104d1eab279a39ebf0481269426c2e2de8f5587 (patch) | |
tree | 0278831b3d1b31ec235c9ff50aa5d0ac45b7dcb8 /test/CodeGen/X86/sink-hoist.ll | |
parent | 83f6120c9a1fe758b2502b060cd7ae9a981ecc39 (diff) | |
download | external_llvm-a104d1eab279a39ebf0481269426c2e2de8f5587.zip external_llvm-a104d1eab279a39ebf0481269426c2e2de8f5587.tar.gz external_llvm-a104d1eab279a39ebf0481269426c2e2de8f5587.tar.bz2 |
Mark dead physregdefs dead immediately. This helps MachineSink and
MachineLICM and other things which run before LiveVariables is run.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85360 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/sink-hoist.ll')
-rw-r--r-- | test/CodeGen/X86/sink-hoist.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/X86/sink-hoist.ll b/test/CodeGen/X86/sink-hoist.ll index 4042a09..7f63669 100644 --- a/test/CodeGen/X86/sink-hoist.ll +++ b/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 +} |