From 83a8b8b87c9ee5d5799ac63cb52d0926ff46197d Mon Sep 17 00:00:00 2001 From: Sanjay Patel Date: Mon, 2 Oct 2017 20:07:15 +0000 Subject: [PATCH] [InstCombine] add icmp (shr X, Y), 0 test; NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314710 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Transforms/InstCombine/icmp-shr.ll | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/Transforms/InstCombine/icmp-shr.ll b/test/Transforms/InstCombine/icmp-shr.ll index e002b2033ad..214f315f317 100644 --- a/test/Transforms/InstCombine/icmp-shr.ll +++ b/test/Transforms/InstCombine/icmp-shr.ll @@ -493,3 +493,17 @@ define i1 @exact_multiuse(i32 %x) { ret i1 %cmp } +declare void @foo2(<2 x i32>) +define <2 x i1> @exact_eq0_multiuse(<2 x i32> %x, <2 x i32> %y) { +; CHECK-LABEL: @exact_eq0_multiuse( +; CHECK-NEXT: [[SH:%.*]] = ashr exact <2 x i32> %x, %y +; CHECK-NEXT: [[CMP:%.*]] = icmp eq <2 x i32> [[SH]], zeroinitializer +; CHECK-NEXT: call void @foo2(<2 x i32> [[SH]]) +; CHECK-NEXT: ret <2 x i1> [[CMP]] +; + %sh = ashr exact <2 x i32> %x, %y + %cmp = icmp eq <2 x i32> %sh, zeroinitializer + call void @foo2(<2 x i32> %sh) + ret <2 x i1> %cmp +} + -- 2.49.0