1 ; RUN: llc -march=hexagon < %s
2 ; Used to fail with "Cannot select: 0x16cb7f0: v2i16 = truncate"
4 ; ModuleID = 'bugpoint-reduced-simplified.bc'
5 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"
6 target triple = "hexagon-unknown-linux-gnu"
8 define void @Autocorr() nounwind {
12 for.body: ; preds = %for.body, %entry
13 br i1 undef, label %polly.loop_header43, label %for.body
15 do.cond: ; preds = %polly.loop_header
18 do.end: ; preds = %polly.loop_after45
21 polly.loop_header: ; preds = %polly.loop_after45, %polly.loop_body
22 %0 = icmp sle i32 undef, 239
23 br i1 %0, label %polly.loop_body, label %do.cond
25 polly.loop_body: ; preds = %polly.loop_header
26 %p_25 = call i32 @llvm.hexagon.A2.asrh(i32 undef)
27 %1 = insertelement <4 x i32> undef, i32 %p_25, i32 3
28 %2 = trunc <4 x i32> %1 to <4 x i16>
29 store <4 x i16> %2, ptr undef, align 8
30 br label %polly.loop_header
32 polly.loop_after45: ; preds = %polly.loop_header43
33 br i1 undef, label %polly.loop_header, label %do.end
35 polly.loop_header43: ; preds = %polly.loop_body44, %for.body
36 br i1 undef, label %polly.loop_body44, label %polly.loop_after45
38 polly.loop_body44: ; preds = %polly.loop_header43
39 br label %polly.loop_header43
42 declare i32 @llvm.hexagon.A2.asrh(i32) nounwind readnone