; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=armv7 | FileCheck %s
;
; Ensure that don't crash given a largeish power-of-two shufflevector index.
%struct.desc = type { i32, [7 x i32] }
define i32 @foo(ptr %descs, i32 %num, i32 %cw) local_unnamed_addr #0 {
; CHECK-LABEL: foo:
; CHECK: @ %bb.0: @ %entry
; CHECK-NEXT: vldr d16, [r0, #32]
; CHECK-NEXT: vadd.i32 d16, d16, d16
; CHECK-NEXT: vmov.32 r0, d16[0]
; CHECK-NEXT: bx lr
entry:
%wide.vec = load <16 x i32>, ptr %descs, align 4
%strided.vec = shufflevector <16 x i32> %wide.vec, <16 x i32> undef, <2 x i32> <i32 0, i32 8>
%bin.rdx20 = add <2 x i32> %strided.vec, %strided.vec
%0 = extractelement <2 x i32> %bin.rdx20, i32 1
ret i32 %0
}