From 2f1e1c351b7a6fe1db3f28cdf1a5a70464b9f97b Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Thu, 6 Apr 2017 17:33:37 +0000 Subject: [InstSimplify] Teach SimplifyMulInst to recognize vectors of i1 as And. Not just scalar i1. llvm-svn: 299665 --- llvm/test/Transforms/InstSimplify/mul.ll | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 llvm/test/Transforms/InstSimplify/mul.ll (limited to 'llvm/test/Transforms/InstSimplify') 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, + %res = mul <2 x i1> %b, + ret <2 x i1> %res +} -- cgit v1.2.3