28 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 52; RUN: opt -passes=instcombine -S -o - < %s | FileCheck %s3 4define <vscale x 2 x float> @shrink_splat_scalable_extend(<vscale x 2 x float> %a) {5; CHECK-LABEL: define <vscale x 2 x float> @shrink_splat_scalable_extend(6; CHECK-SAME: <vscale x 2 x float> [[A:%.*]]) {7; CHECK-NEXT: [[TMP1:%.*]] = fadd <vscale x 2 x float> [[A]], splat (float -1.000000e+00)8; CHECK-NEXT: ret <vscale x 2 x float> [[TMP1]]9;10 %2 = fpext <vscale x 2 x float> %a to <vscale x 2 x double>11 %3 = fpext <vscale x 2 x float> splat (float -1.000000e+00) to <vscale x 2 x double>12 %4 = fadd <vscale x 2 x double> %2, %313 %5 = fptrunc <vscale x 2 x double> %4 to <vscale x 2 x float>14 ret <vscale x 2 x float> %515}16 17define <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: [[TMP3:%.*]] = fadd <vscale x 2 x float> [[A]], splat (float -1.000000e+00)21; CHECK-NEXT: ret <vscale x 2 x float> [[TMP3]]22;23 %2 = fpext <vscale x 2 x float> %a to <vscale x 2 x double>24 %4 = fadd <vscale x 2 x double> %2, splat (double -1.000000e+00)25 %5 = fptrunc <vscale x 2 x double> %4 to <vscale x 2 x float>26 ret <vscale x 2 x float> %527}28