summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/live-out-reg-info.ll
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-03-31 01:38:29 +0000
committerDan Gohman <gohman@apple.com>2009-03-31 01:38:29 +0000
commit07c26ee87e4060f487867f1e283801bd8ced62d1 (patch)
treefb58ab88f79f2c7c31a024aec0b58bd22f2d06da /test/CodeGen/X86/live-out-reg-info.ll
parent4d9523246999531db52312c6eef6af705a5a692e (diff)
downloadllvm-07c26ee87e4060f487867f1e283801bd8ced62d1.tar.gz
llvm-07c26ee87e4060f487867f1e283801bd8ced62d1.tar.bz2
llvm-07c26ee87e4060f487867f1e283801bd8ced62d1.tar.xz
Fix live-out reg logic to not insert over-aggressive AssertZExt
instructions. This fixes lua. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68083 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/live-out-reg-info.ll')
-rw-r--r--test/CodeGen/X86/live-out-reg-info.ll20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/CodeGen/X86/live-out-reg-info.ll b/test/CodeGen/X86/live-out-reg-info.ll
new file mode 100644
index 0000000000..b6fb7dfc72
--- /dev/null
+++ b/test/CodeGen/X86/live-out-reg-info.ll
@@ -0,0 +1,20 @@
+; RUN: llvm-as < %s | llc -march=x86-64 | grep testl
+
+; Make sure dagcombine doesn't eliminate the comparison due
+; to an off-by-one bug with ComputeMaskedBits information.
+
+declare void @qux()
+
+define void @foo(i32 %a) {
+ %t0 = lshr i32 %a, 23
+ br label %next
+next:
+ %t1 = and i32 %t0, 256
+ %t2 = icmp eq i32 %t1, 0
+ br i1 %t2, label %true, label %false
+true:
+ call void @qux()
+ ret void
+false:
+ ret void
+}