1; RUN: llc -march=hexagon < %s 2; REQUIRES: asserts 3; Used to fail with: Assertion `VT.getSizeInBits() == Operand.getValueType().getSizeInBits() && "Cannot BITCAST between types of different sizes!"' failed. 4 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 @foo() nounwind { 9entry: 10 br label %while.body 11 12while.body: ; preds = %if.then155, %if.then12, %entry 13 %cmp.i = icmp eq i8* undef, null 14 br i1 %cmp.i, label %lab_ci.exit, label %if.end.i 15 16if.end.i: ; preds = %while.body 17 unreachable 18 19lab_ci.exit: ; preds = %while.body 20 br i1 false, label %if.then, label %if.else 21 22if.then: ; preds = %lab_ci.exit 23 unreachable 24 25if.else: ; preds = %lab_ci.exit 26 br i1 undef, label %if.then12, label %if.else17 27 28if.then12: ; preds = %if.else 29 br label %while.body 30 31if.else17: ; preds = %if.else 32 br i1 false, label %if.then22, label %if.else35 33 34if.then22: ; preds = %if.else17 35 unreachable 36 37if.else35: ; preds = %if.else17 38 br i1 false, label %if.then40, label %if.else83 39 40if.then40: ; preds = %if.else35 41 unreachable 42 43if.else83: ; preds = %if.else35 44 br i1 false, label %if.then88, label %if.else150 45 46if.then88: ; preds = %if.else83 47 unreachable 48 49if.else150: ; preds = %if.else83 50 %cmp154 = icmp eq i32 undef, 0 51 br i1 %cmp154, label %if.then155, label %if.else208 52 53if.then155: ; preds = %if.else150 54 %call191 = call i32 @strtol() nounwind 55 %conv192 = trunc i32 %call191 to i16 56 %_p_splat_one = insertelement <1 x i16> undef, i16 %conv192, i32 0 57 %_p_splat = shufflevector <1 x i16> %_p_splat_one, <1 x i16> undef, <2 x i32> zeroinitializer 58 %0 = sext <2 x i16> %_p_splat to <2 x i32> 59 %mul198p_vec = shl <2 x i32> %0, <i32 2, i32 2> 60 %1 = extractelement <2 x i32> %mul198p_vec, i32 0 61 store i32 %1, i32* null, align 4 62 br label %while.body 63 64if.else208: ; preds = %if.else150 65 unreachable 66} 67 68declare i32 @strtol() nounwind 69