Skip to content

Commit 11db0bb

Browse files
committed
[InstCombine] Pre-commit test for D124015
Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D124016
1 parent 1fae4b4 commit 11db0bb

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

llvm/test/Transforms/InstCombine/bitcast.ll

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,20 @@ define <2 x float> @test6(float %A){
431431
ret <2 x float> %tmp35
432432
}
433433

434+
; FIXME: This test should not be optimized by OptimizeIntegerToVectorInsertions.
435+
; The bitcast from vector is confusing it.
436+
define <2 x i64> @int2vec_insertion_bitcast_from_vec(i64 %x) {
437+
; CHECK-LABEL: @int2vec_insertion_bitcast_from_vec(
438+
; CHECK-NEXT: [[TMP1:%.*]] = insertelement <2 x i64> <i64 poison, i64 0>, i64 [[X:%.*]], i64 0
439+
; CHECK-NEXT: ret <2 x i64> [[TMP1]]
440+
;
441+
%a = bitcast i64 %x to <8 x i8>
442+
%b = zext <8 x i8> %a to <8 x i16>
443+
%c = bitcast <8 x i16> %b to i128
444+
%d = bitcast i128 %c to <2 x i64>
445+
ret <2 x i64> %d
446+
}
447+
434448
define i64 @ISPC0(i64 %in) {
435449
; CHECK-LABEL: @ISPC0(
436450
; CHECK-NEXT: ret i64 0

0 commit comments

Comments
 (0)