1*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -march=x86-64 -mcpu=corei7-avx -mattr=+avx 2*9880d681SAndroid Build Coastguard Worker; Various missing patterns causing crashes. 3*9880d681SAndroid Build Coastguard Worker; rdar://10538793 4*9880d681SAndroid Build Coastguard Worker 5*9880d681SAndroid Build Coastguard Workerdefine void @t1() nounwind { 6*9880d681SAndroid Build Coastguard Workerentry: 7*9880d681SAndroid Build Coastguard Worker br label %loop.cond 8*9880d681SAndroid Build Coastguard Worker 9*9880d681SAndroid Build Coastguard Workerloop.cond: ; preds = %t1.exit, %entry 10*9880d681SAndroid Build Coastguard Worker br i1 false, label %return, label %loop 11*9880d681SAndroid Build Coastguard Worker 12*9880d681SAndroid Build Coastguard Workerloop: ; preds = %loop.cond 13*9880d681SAndroid Build Coastguard Worker br i1 undef, label %0, label %t1.exit 14*9880d681SAndroid Build Coastguard Worker 15*9880d681SAndroid Build Coastguard Worker; <label>:0 ; preds = %loop 16*9880d681SAndroid Build Coastguard Worker %1 = load <16 x i32>, <16 x i32> addrspace(1)* undef, align 64 17*9880d681SAndroid Build Coastguard Worker %2 = shufflevector <16 x i32> <i32 0, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>, <16 x i32> %1, <16 x i32> <i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 16, i32 0, i32 0> 18*9880d681SAndroid Build Coastguard Worker store <16 x i32> %2, <16 x i32> addrspace(1)* undef, align 64 19*9880d681SAndroid Build Coastguard Worker br label %t1.exit 20*9880d681SAndroid Build Coastguard Worker 21*9880d681SAndroid Build Coastguard Workert1.exit: ; preds = %0, %loop 22*9880d681SAndroid Build Coastguard Worker br label %loop.cond 23*9880d681SAndroid Build Coastguard Worker 24*9880d681SAndroid Build Coastguard Workerreturn: ; preds = %loop.cond 25*9880d681SAndroid Build Coastguard Worker ret void 26*9880d681SAndroid Build Coastguard Worker} 27*9880d681SAndroid Build Coastguard Worker 28*9880d681SAndroid Build Coastguard Workerdefine void @t2() nounwind { 29*9880d681SAndroid Build Coastguard Worker br i1 undef, label %1, label %4 30*9880d681SAndroid Build Coastguard Worker 31*9880d681SAndroid Build Coastguard Worker; <label>:1 ; preds = %0 32*9880d681SAndroid Build Coastguard Worker %2 = load <16 x i32>, <16 x i32> addrspace(1)* undef, align 64 33*9880d681SAndroid Build Coastguard Worker %3 = shufflevector <16 x i32> <i32 0, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>, <16 x i32> %2, <16 x i32> <i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 20, i32 0, i32 0, i32 0, i32 0> 34*9880d681SAndroid Build Coastguard Worker store <16 x i32> %3, <16 x i32> addrspace(1)* undef, align 64 35*9880d681SAndroid Build Coastguard Worker br label %4 36*9880d681SAndroid Build Coastguard Worker 37*9880d681SAndroid Build Coastguard Worker; <label>:4 ; preds = %1, %0 38*9880d681SAndroid Build Coastguard Worker ret void 39*9880d681SAndroid Build Coastguard Worker} 40*9880d681SAndroid Build Coastguard Worker 41*9880d681SAndroid Build Coastguard Workerdefine void @t3() nounwind { 42*9880d681SAndroid Build Coastguard Workerentry: 43*9880d681SAndroid Build Coastguard Worker br label %loop.cond 44*9880d681SAndroid Build Coastguard Worker 45*9880d681SAndroid Build Coastguard Workerloop.cond: ; preds = %t2.exit, %entry 46*9880d681SAndroid Build Coastguard Worker br i1 false, label %return, label %loop 47*9880d681SAndroid Build Coastguard Worker 48*9880d681SAndroid Build Coastguard Workerloop: ; preds = %loop.cond 49*9880d681SAndroid Build Coastguard Worker br i1 undef, label %0, label %t2.exit 50*9880d681SAndroid Build Coastguard Worker 51*9880d681SAndroid Build Coastguard Worker; <label>:0 ; preds = %loop 52*9880d681SAndroid Build Coastguard Worker %1 = shufflevector <16 x i32> <i32 0, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>, <16 x i32> undef, <16 x i32> <i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 25, i32 0> 53*9880d681SAndroid Build Coastguard Worker %2 = load <16 x i32>, <16 x i32> addrspace(1)* undef, align 64 54*9880d681SAndroid Build Coastguard Worker %3 = shufflevector <16 x i32> <i32 0, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef>, <16 x i32> %2, <16 x i32> <i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 28, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0> 55*9880d681SAndroid Build Coastguard Worker store <16 x i32> %3, <16 x i32> addrspace(1)* undef, align 64 56*9880d681SAndroid Build Coastguard Worker br label %t2.exit 57*9880d681SAndroid Build Coastguard Worker 58*9880d681SAndroid Build Coastguard Workert2.exit: ; preds = %0, %loop 59*9880d681SAndroid Build Coastguard Worker br label %loop.cond 60*9880d681SAndroid Build Coastguard Worker 61*9880d681SAndroid Build Coastguard Workerreturn: ; preds = %loop.cond 62*9880d681SAndroid Build Coastguard Worker ret void 63*9880d681SAndroid Build Coastguard Worker} 64*9880d681SAndroid Build Coastguard Worker 65*9880d681SAndroid Build Coastguard Workerdefine <3 x i64> @t4() nounwind { 66*9880d681SAndroid Build Coastguard Workerentry: 67*9880d681SAndroid Build Coastguard Worker %0 = load <2 x i64>, <2 x i64> addrspace(1)* undef, align 16 68*9880d681SAndroid Build Coastguard Worker %1 = extractelement <2 x i64> %0, i32 0 69*9880d681SAndroid Build Coastguard Worker %2 = insertelement <3 x i64> <i64 undef, i64 0, i64 0>, i64 %1, i32 0 70*9880d681SAndroid Build Coastguard Worker ret <3 x i64> %2 71*9880d681SAndroid Build Coastguard Worker} 72*9880d681SAndroid Build Coastguard Worker 73*9880d681SAndroid Build Coastguard Workerdefine void @t5() nounwind { 74*9880d681SAndroid Build Coastguard Workerentry: 75*9880d681SAndroid Build Coastguard Worker %0 = shufflevector <2 x i64> zeroinitializer, <2 x i64> undef, <8 x i32> <i32 0, i32 1, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef> 76*9880d681SAndroid Build Coastguard Worker %1 = shufflevector <8 x i64> <i64 0, i64 0, i64 0, i64 undef, i64 undef, i64 0, i64 0, i64 0>, <8 x i64> %0, <8 x i32> <i32 0, i32 1, i32 2, i32 9, i32 8, i32 5, i32 6, i32 7> 77*9880d681SAndroid Build Coastguard Worker store <8 x i64> %1, <8 x i64> addrspace(1)* undef, align 64 78*9880d681SAndroid Build Coastguard Worker 79*9880d681SAndroid Build Coastguard Worker ret void 80*9880d681SAndroid Build Coastguard Worker} 81