1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -march=hexagon < %s | FileCheck %s
4 ; Check that we generate zero-extends, instead of just shifting and oring
5 ; registers (which can contain sign-extended negative values).
7 define i32 @fred(i8 %a0, i8 %a1, i8 %a2, i8 %a3) #0 {
9 ; CHECK: // %bb.0: // %b4
11 ; CHECK-NEXT: r1 = and(r1,#255)
12 ; CHECK-NEXT: r3 = and(r3,#255)
15 ; CHECK-NEXT: r0 = insert(r1,#24,#8)
16 ; CHECK-NEXT: r2 = insert(r3,#24,#8)
19 ; CHECK-NEXT: r0 = combine(r2.l,r0.l)
20 ; CHECK-NEXT: jumpr r31
23 %v5 = insertelement <4 x i8> undef, i8 %a0, i32 0
24 %v6 = insertelement <4 x i8> %v5, i8 %a1, i32 1
25 %v7 = insertelement <4 x i8> %v6, i8 %a2, i32 2
26 %v8 = insertelement <4 x i8> %v7, i8 %a3, i32 3
27 %v9 = bitcast <4 x i8> %v8 to i32
31 attributes #0 = { nounwind readnone }