Home | History | Annotate | Download | only in ARM
      1 ; RUN: llc < %s -mtriple=armv7 | FileCheck %s
      2 ;
      3 ; Ensure that don't crash given a largeish power-of-two shufflevector index.
      4 
      5 %struct.desc = type { i32, [7 x i32] }
      6 
      7 define i32 @foo(%struct.desc* %descs, i32 %num, i32 %cw) local_unnamed_addr #0 {
      8 ; CHECK-LABEL: foo:
      9 ; CHECK:       @ %bb.0: @ %entry
     10 ; CHECK-NEXT:    mov r1, #32
     11 ; CHECK-NEXT:    vld1.32 {d16, d17}, [r0], r1
     12 ; CHECK-NEXT:    vld1.32 {d18, d19}, [r0]
     13 ; CHECK-NEXT:    vtrn.32 q8, q9
     14 ; CHECK-NEXT:    vadd.i32 d16, d16, d16
     15 ; CHECK-NEXT:    vmov.32 r0, d16[1]
     16 ; CHECK-NEXT:    bx lr
     17 entry:
     18   %descs.vec = bitcast %struct.desc* %descs to <16 x i32>*
     19   %wide.vec = load <16 x i32>, <16 x i32>* %descs.vec, align 4
     20   %strided.vec = shufflevector <16 x i32> %wide.vec, <16 x i32> undef, <2 x i32> <i32 0, i32 8>
     21   %bin.rdx20 = add <2 x i32> %strided.vec, %strided.vec
     22   %0 = extractelement <2 x i32> %bin.rdx20, i32 1
     23   ret i32 %0
     24 }
     25