From 4e63db83873f22d185a3f27633aae710c2517efe Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Tue, 11 Sep 2018 17:57:20 +0000 Subject: [InstCombine] Fix incorrect usage of getPrimitiveSizeInBits when we should be using the element size for vectors For vectors, getPrimitiveSizeInBits returns the full vector width. This code should using the element size for vectors. This could be fixed by calling getScalarSizeInBits, but its even easier to just get it from the APInt we're checking. Differential Revision: https://reviews.llvm.org/D51938 llvm-svn: 341971 --- llvm/test/Transforms/InstCombine/mul.ll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/test') diff --git a/llvm/test/Transforms/InstCombine/mul.ll b/llvm/test/Transforms/InstCombine/mul.ll index 788e55907a5..fc3773aa9f1 100644 --- a/llvm/test/Transforms/InstCombine/mul.ll +++ b/llvm/test/Transforms/InstCombine/mul.ll @@ -409,7 +409,7 @@ define i32 @test32(i32 %X) { define <2 x i32> @test32vec(<2 x i32> %X) { ; CHECK-LABEL: @test32vec( -; CHECK-NEXT: [[MUL:%.*]] = shl nsw <2 x i32> [[X:%.*]], +; CHECK-NEXT: [[MUL:%.*]] = shl <2 x i32> [[X:%.*]], ; CHECK-NEXT: ret <2 x i32> [[MUL]] ; %mul = mul nsw <2 x i32> %X, -- cgit v1.2.3