summaryrefslogtreecommitdiff
path: root/test/CodeGen
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-06-16 22:52:53 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-06-16 22:52:53 +0000
commitc3de802ad9f0dbbb5c6531b0d30fbe96fc3c36c4 (patch)
tree605c91b110ba676f85140307639866b3111586c1 /test/CodeGen
parent9b93dd1f1ab3532a101a432d7000477adfe6401d (diff)
downloadllvm-c3de802ad9f0dbbb5c6531b0d30fbe96fc3c36c4.tar.gz
llvm-c3de802ad9f0dbbb5c6531b0d30fbe96fc3c36c4.tar.bz2
llvm-c3de802ad9f0dbbb5c6531b0d30fbe96fc3c36c4.tar.xz
Do not issue identity copies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52373 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/X86/2008-06-16-SubregsBug.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGen/X86/2008-06-16-SubregsBug.ll b/test/CodeGen/X86/2008-06-16-SubregsBug.ll
new file mode 100644
index 0000000000..75513b665a
--- /dev/null
+++ b/test/CodeGen/X86/2008-06-16-SubregsBug.ll
@@ -0,0 +1,14 @@
+; RUN: llvm-as < %s | llc -mtriple=i386-apple-darwin | grep mov | count 4
+
+define i16 @test(i16* %tmp179) nounwind {
+ %tmp180 = load i16* %tmp179, align 2 ; <i16> [#uses=2]
+ %tmp184 = and i16 %tmp180, -1024 ; <i16> [#uses=1]
+ %tmp186 = icmp eq i16 %tmp184, -32768 ; <i1> [#uses=1]
+ br i1 %tmp186, label %bb189, label %bb288
+
+bb189: ; preds = %0
+ ret i16 %tmp180
+
+bb288: ; preds = %0
+ ret i16 32
+}