1; RUN: llc -march=hexagon < %s 2; Used to fail with "Cannot select: 0x16cb7f0: v2i16 = truncate" 3 4; ModuleID = 'bugpoint-reduced-simplified.bc' 5target 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" 6target triple = "hexagon-unknown-linux-gnu" 7 8define void @Autocorr() nounwind { 9entry: 10 br label %for.body 11 12for.body: ; preds = %for.body, %entry 13 br i1 undef, label %polly.loop_header43, label %for.body 14 15do.cond: ; preds = %polly.loop_header 16 unreachable 17 18do.end: ; preds = %polly.loop_after45 19 ret void 20 21polly.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 24 25polly.loop_body: ; preds = %polly.loop_header 26 %p_25 = call i32 @llvm.hexagon.SI.to.SXTHI.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, <4 x i16>* undef, align 8 30 br label %polly.loop_header 31 32polly.loop_after45: ; preds = %polly.loop_header43 33 br i1 undef, label %polly.loop_header, label %do.end 34 35polly.loop_header43: ; preds = %polly.loop_body44, %for.body 36 br i1 undef, label %polly.loop_body44, label %polly.loop_after45 37 38polly.loop_body44: ; preds = %polly.loop_header43 39 br label %polly.loop_header43 40} 41 42declare i32 @llvm.hexagon.SI.to.SXTHI.asrh(i32) nounwind readnone 43