1; RUN: opt < %s -instcombine -S | FileCheck %s 2 3; CHECK: @a 4; CHECK-NOT: bitcast 5; CHECK: ret 6define <4 x i32> @a(<1 x i64> %y) { 7 %c = bitcast <2 x i64> <i64 0, i64 0> to <4 x i32> 8 ret <4 x i32> %c 9} 10 11; CHECK: @b 12; CHECK-NOT: bitcast 13; CHECK: ret 14 15define <4 x i32> @b(<1 x i64> %y) { 16 %c = bitcast <2 x i64> <i64 -1, i64 -1> to <4 x i32> 17 ret <4 x i32> %c 18} 19 20; CHECK: @foo 21; CHECK-NOT: bitcast 22; CHECK: ret 23 24; from MultiSource/Benchmarks/Bullet 25define <2 x float> @foo() { 26 %cast = bitcast i64 -1 to <2 x float> 27 ret <2 x float> %cast 28} 29 30 31; CHECK: @foo2 32; CHECK-NOT: bitcast 33; CHECK: ret 34define <2 x double> @foo2() { 35 %cast = bitcast i128 -1 to <2 x double> 36 ret <2 x double> %cast 37} 38 39; CHECK: @foo3 40; CHECK-NOT: bitcast 41; CHECK: ret 42define <1 x float> @foo3() { 43 %cast = bitcast i32 -1 to <1 x float> 44 ret <1 x float> %cast 45} 46 47; CHECK: @foo4 48; CHECK-NOT: bitcast 49; CHECK: ret 50define float @foo4() { 51 %cast = bitcast <1 x i32 ><i32 -1> to float 52 ret float %cast 53} 54 55; CHECK: @foo5 56; CHECK-NOT: bitcast 57; CHECK: ret 58define double @foo5() { 59 %cast = bitcast <2 x i32 ><i32 -1, i32 -1> to double 60 ret double %cast 61} 62 63 64; CHECK: @foo6 65; CHECK-NOT: bitcast 66; CHECK: ret 67define <2 x double> @foo6() { 68 %cast = bitcast <4 x i32><i32 -1, i32 -1, i32 -1, i32 -1> to <2 x double> 69 ret <2 x double> %cast 70} 71