1 ; RUN: llc -march=hexagon < %s
3 ; Used to fail with "Unexpected illegal type!"
4 ; Used to fail with "Cannot select: ch = store x,x,x,<ST4[undef](align=8), trunc to v4i8>"
6 ; ModuleID = 'bugpoint-reduced-simplified.bc'
7 target datalayout = "e-p:32:32:32-i64:64:64-i32:32:32-i16:16:16-i1:32:32-f64:64:64-f32:32:32-a0:0-n32"
8 target triple = "hexagon-unknown-linux-gnu"
10 define void @foo() nounwind {
14 for.body: ; preds = %for.body, %entry
15 br i1 undef, label %for.end, label %for.body
17 for.end: ; preds = %for.body
20 for.body71: ; preds = %for.body71, %for.end
21 br i1 undef, label %for.end96, label %for.body71
23 for.end96: ; preds = %for.body71
24 switch i32 undef, label %sw.epilog [
25 i32 1, label %for.cond375.preheader
26 i32 8, label %for.cond591
29 for.cond375.preheader: ; preds = %for.end96
30 br label %polly.loop_header228
32 for.cond591: ; preds = %for.end96
35 for.body664: ; preds = %for.body664, %for.cond591
36 br i1 undef, label %for.end670, label %for.body664
38 for.end670: ; preds = %for.body664
41 sw.epilog: ; preds = %for.end670, %for.end96
44 polly.loop_header228: ; preds = %polly.loop_header228, %for.cond375.preheader
45 %_p_splat_one = load <1 x i16>, <1 x i16>* undef, align 8
46 %_p_splat = shufflevector <1 x i16> %_p_splat_one, <1 x i16> %_p_splat_one, <4 x i32> zeroinitializer
47 %0 = trunc <4 x i16> %_p_splat to <4 x i8>
48 store <4 x i8> %0, <4 x i8>* undef, align 8
49 br label %polly.loop_header228