File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
llvm/test/Transforms/InstCombine Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -13,3 +13,17 @@ define <vscale x 2 x float> @shrink_splat_scalable_extend(<vscale x 2 x float> %
13
13
%5 = fptrunc <vscale x 2 x double > %4 to <vscale x 2 x float >
14
14
ret <vscale x 2 x float > %5
15
15
}
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
+ }
You can’t perform that action at this time.
0 commit comments