66 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 32; RUN: opt -S -passes=instsimplify < %s | FileCheck %s3 4; All of these constant expressions should fold.5 6define <2 x float> @ga() {7; CHECK-LABEL: define <2 x float> @ga() {8; CHECK-NEXT: ret <2 x float> <float 0x4011333340000000, float 0x40099999A0000000>9;10 %fptrunc = fptrunc <2 x double> <double 4.3, double 3.2> to <2 x float>11 ret <2 x float> %fptrunc12}13define <2 x double> @gb() {14; CHECK-LABEL: define <2 x double> @gb() {15; CHECK-NEXT: ret <2 x double> <double 2.000000e+00, double 8.000000e+00>16;17 %fpext = fpext <2 x float><float 2.0, float 8.0> to <2 x double>18 ret <2 x double> %fpext19}20define <2 x i32> @gf() {21; CHECK-LABEL: define <2 x i32> @gf() {22; CHECK-NEXT: ret <2 x i32> <i32 3, i32 4>23;24 ret <2 x i32> trunc (<2 x i64><i64 3, i64 4> to <2 x i32>)25}26define <2 x i32> @gh() {27; CHECK-LABEL: define <2 x i32> @gh() {28; CHECK-NEXT: ret <2 x i32> <i32 8, i32 7>29;30 %fptoui = fptoui <2 x float><float 8.0, float 7.0> to <2 x i32>31 ret <2 x i32> %fptoui32}33define <2 x i32> @gi() {34; CHECK-LABEL: define <2 x i32> @gi() {35; CHECK-NEXT: ret <2 x i32> <i32 8, i32 7>36;37 %fptosi = fptosi <2 x float><float 8.0, float 7.0> to <2 x i32>38 ret <2 x i32> %fptosi39}40define <2 x float> @gj() {41; CHECK-LABEL: define <2 x float> @gj() {42; CHECK-NEXT: ret <2 x float> <float 8.000000e+00, float 7.000000e+00>43;44 %uitofp = uitofp <2 x i32><i32 8, i32 7> to <2 x float>45 ret <2 x float> %uitofp46}47define <2 x float> @gk() {48; CHECK-LABEL: define <2 x float> @gk() {49; CHECK-NEXT: ret <2 x float> <float 8.000000e+00, float 7.000000e+00>50;51 %sitofp = sitofp <2 x i32><i32 8, i32 7> to <2 x float>52 ret <2 x float> %sitofp53}54define <2 x double> @gl() {55; CHECK-LABEL: define <2 x double> @gl() {56; CHECK-NEXT: ret <2 x double> <double 4.000000e+00, double 3.000000e+00>57;58 ret <2 x double> bitcast (<2 x double><double 4.0, double 3.0> to <2 x double>)59}60define <2 x double> @gm() {61; CHECK-LABEL: define <2 x double> @gm() {62; CHECK-NEXT: ret <2 x double> <double 1.976260e-323, double 1.482200e-323>63;64 ret <2 x double> bitcast (<2 x i64><i64 4, i64 3> to <2 x double>)65}66