summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstSimplify
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2017-04-06 17:33:37 +0000
committerCraig Topper <craig.topper@gmail.com>2017-04-06 17:33:37 +0000
commit2f1e1c351b7a6fe1db3f28cdf1a5a70464b9f97b (patch)
treea1bcf3156e209b90c5bbd9e69b8de544386078fd /llvm/test/Transforms/InstSimplify
parent058abf1a4a45134988ea7b7ea0785c50a00d1bdf (diff)
downloadbcm5719-llvm-2f1e1c351b7a6fe1db3f28cdf1a5a70464b9f97b.tar.gz
bcm5719-llvm-2f1e1c351b7a6fe1db3f28cdf1a5a70464b9f97b.zip
[InstSimplify] Teach SimplifyMulInst to recognize vectors of i1 as And. Not just scalar i1.
llvm-svn: 299665
Diffstat (limited to 'llvm/test/Transforms/InstSimplify')
-rw-r--r--llvm/test/Transforms/InstSimplify/mul.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstSimplify/mul.ll b/llvm/test/Transforms/InstSimplify/mul.ll
new file mode 100644
index 00000000000..0bf8f699a68
--- /dev/null
+++ b/llvm/test/Transforms/InstSimplify/mul.ll
@@ -0,0 +1,11 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt < %s -instsimplify -S | FileCheck %s
+
+define <2 x i1> @test1(<2 x i1> %a) {
+; CHECK-LABEL: @test1(
+; CHECK-NEXT: ret <2 x i1> zeroinitializer
+;
+ %b = and <2 x i1> %a, <i1 true, i1 false>
+ %res = mul <2 x i1> %b, <i1 false, i1 true>
+ ret <2 x i1> %res
+}
OpenPOWER on IntegriCloud