summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/xor-undef.ll
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-03-25 20:07:13 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-03-25 20:07:13 +0000
commit2b72c059925648887f0714e369977d3074a331a7 (patch)
tree119995ec41c4792a62030de2c6d0829d046ea116 /llvm/test/Transforms/InstCombine/xor-undef.ll
parent4c1559f54eb1cb465c83ea23b79368800433031e (diff)
downloadbcm5719-llvm-2b72c059925648887f0714e369977d3074a331a7.tar.gz
bcm5719-llvm-2b72c059925648887f0714e369977d3074a331a7.zip
Handle a special case xor undef, undef -> 0. Technically this should be transformed to undef. But this is such a common idiom (misuse) we are going to handle it.
llvm-svn: 48791
Diffstat (limited to 'llvm/test/Transforms/InstCombine/xor-undef.ll')
-rw-r--r--llvm/test/Transforms/InstCombine/xor-undef.ll6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/xor-undef.ll b/llvm/test/Transforms/InstCombine/xor-undef.ll
new file mode 100644
index 00000000000..c090223b537
--- /dev/null
+++ b/llvm/test/Transforms/InstCombine/xor-undef.ll
@@ -0,0 +1,6 @@
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep zeroinitializer
+
+define <2 x i64> @f() {
+ %tmp = xor <2 x i64> undef, undef
+ ret <2 x i64> %tmp
+}
OpenPOWER on IntegriCloud