1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

[InstCombine] Add test case demonstrating that we don't propagate nsw flag when converting mul by pow2 to shl when the type is larger than 64-bits. NFC

llvm-svn: 306427
This commit is contained in:
Craig Topper 2017-06-27 17:16:03 +00:00
parent aa24605f0f
commit dd736da225

View File

@ -324,3 +324,13 @@ define <2 x i32> @test33vec(<2 x i32> %X) {
%mul = mul nsw <2 x i32> %X, <i32 1073741824, i32 1073741824>
ret <2 x i32> %mul
}
; TODO: we should propagate nsw flag to the shift here, but we only handle i64 and smaller
define i128 @test34(i128 %X) {
; CHECK-LABEL: @test34(
; CHECK-NEXT: [[MUL:%.*]] = shl i128 [[X:%.*]], 1
; CHECK-NEXT: ret i128 [[MUL]]
;
%mul = mul nsw i128 %X, 2
ret i128 %mul
}