Skip to content

Commit 4b9c243

Browse files
committed
Precommit tests
1 parent 64555e3 commit 4b9c243

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

llvm/test/Transforms/InstCombine/scalable-const-fp-splat.ll

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,17 @@ define <vscale x 2 x float> @shrink_splat_scalable_extend(<vscale x 2 x float> %
1313
%5 = fptrunc <vscale x 2 x double> %4 to <vscale x 2 x float>
1414
ret <vscale x 2 x float> %5
1515
}
16+
17+
define <vscale x 2 x float> @shrink_splat_scalable_extend_rhs_constexpr(<vscale x 2 x float> %a) {
18+
; CHECK-LABEL: define <vscale x 2 x float> @shrink_splat_scalable_extend_rhs_constexpr(
19+
; CHECK-SAME: <vscale x 2 x float> [[A:%.*]]) {
20+
; CHECK-NEXT: [[TMP1:%.*]] = fpext <vscale x 2 x float> [[A]] to <vscale x 2 x double>
21+
; CHECK-NEXT: [[TMP2:%.*]] = fadd <vscale x 2 x double> [[TMP1]], splat (double -1.000000e+00)
22+
; CHECK-NEXT: [[TMP3:%.*]] = fptrunc <vscale x 2 x double> [[TMP2]] to <vscale x 2 x float>
23+
; CHECK-NEXT: ret <vscale x 2 x float> [[TMP3]]
24+
;
25+
%2 = fpext <vscale x 2 x float> %a to <vscale x 2 x double>
26+
%4 = fadd <vscale x 2 x double> %2, splat (double -1.000000e+00)
27+
%5 = fptrunc <vscale x 2 x double> %4 to <vscale x 2 x float>
28+
ret <vscale x 2 x float> %5
29+
}

0 commit comments

Comments
 (0)