1 ; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7
3 define void @test1(i1 %x, i8 %x2, i8* %x3, i64 %x4) {
5 %tmp3 = and i64 %x4, 16
6 %bf.shl = trunc i64 %tmp3 to i8
7 %bf.clear = and i8 %x2, -17
8 %bf.set = or i8 %bf.shl, %bf.clear
9 br i1 %x, label %if.then, label %if.end
15 store i8 %bf.set, i8* %x3, align 4
19 ; A BUILD_VECTOR of 1 element caused a crash in combineBVOfConsecutiveLoads()
20 ; Test that this is no longer the case
21 define signext i32 @test2() {
23 %retval = alloca i32, align 4
24 %__a = alloca i128, align 16
25 %b = alloca i64, align 8
26 store i32 0, i32* %retval, align 4
27 %0 = load i128, i128* %__a, align 16
28 %splat.splatinsert = insertelement <1 x i128> undef, i128 %0, i32 0
29 %splat.splat = shufflevector <1 x i128> %splat.splatinsert, <1 x i128> undef, <1 x i32> zeroinitializer
30 %1 = bitcast <1 x i128> %splat.splat to <2 x i64>
31 %2 = extractelement <2 x i64> %1, i32 0
32 store i64 %2, i64* %b, align 8