summaryrefslogtreecommitdiff
path: root/test
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
commitd34af7875b682d519038295b04ab4e15f237ccdf (patch)
treebae780720ba296a7baea44957888c442f8cb9628 /test
parent1cf962b8749900a0b5b623366b72c34e08cd6a15 (diff)
downloadllvm-d34af7875b682d519038295b04ab4e15f237ccdf.tar.gz
llvm-d34af7875b682d519038295b04ab4e15f237ccdf.tar.bz2
llvm-d34af7875b682d519038295b04ab4e15f237ccdf.tar.xz
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48791 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/InstCombine/xor-undef.ll6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/xor-undef.ll b/test/Transforms/InstCombine/xor-undef.ll
new file mode 100644
index 0000000000..c090223b53
--- /dev/null
+++ b/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
+}