Skip to content

Commit 5ebf099

Browse files
committed
Precommit tests
1 parent bb2f759 commit 5ebf099

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

llvm/test/Transforms/InstCombine/vec_shuffle-inseltpoison.ll

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1789,3 +1789,26 @@ define <4 x i32> @PR46872(<4 x i32> %x) {
17891789
ret <4 x i32> %a
17901790
}
17911791

1792+
define <vscale x 4 x i32> @scalable_splat_binop_constant_rhs(<vscale x 4 x i32> %x) {
1793+
; CHECK-LABEL: @scalable_splat_binop_constant_rhs(
1794+
; CHECK-NEXT: [[R:%.*]] = shufflevector <vscale x 4 x i32> [[TMP1:%.*]], <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
1795+
; CHECK-NEXT: [[R1:%.*]] = add <vscale x 4 x i32> [[R]], splat (i32 42)
1796+
; CHECK-NEXT: ret <vscale x 4 x i32> [[R1]]
1797+
;
1798+
1799+
%splatx = shufflevector <vscale x 4 x i32> %x, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
1800+
%r = add <vscale x 4 x i32> %splatx, splat (i32 42)
1801+
ret <vscale x 4 x i32> %r
1802+
}
1803+
1804+
define <vscale x 4 x float> @scalable_splat_binop_constant_lhs(<vscale x 4 x float> %x) {
1805+
; CHECK-LABEL: @scalable_splat_binop_constant_lhs(
1806+
; CHECK-NEXT: [[R:%.*]] = shufflevector <vscale x 4 x float> [[TMP1:%.*]], <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
1807+
; CHECK-NEXT: [[R1:%.*]] = fadd <vscale x 4 x float> [[R]], splat (float 4.200000e+01)
1808+
; CHECK-NEXT: ret <vscale x 4 x float> [[R1]]
1809+
;
1810+
1811+
%splatx = shufflevector <vscale x 4 x float> %x, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
1812+
%r = fadd <vscale x 4 x float> splat (float 42.0), %splatx
1813+
ret <vscale x 4 x float> %r
1814+
}

0 commit comments

Comments
 (0)