1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=thumbv8.1m.main-arm-none-eabi -mattr=+mve -verify-machineinstrs %s -o - | FileCheck %s
4 define void @_Z4loopPxS_iS_i(i64* %d) {
5 ; CHECK-LABEL: _Z4loopPxS_iS_i:
6 ; CHECK: @ %bb.0: @ %entry
7 ; CHECK-NEXT: vldrw.u32 q0, [r0]
8 ; CHECK-NEXT: vmov r1, s2
9 ; CHECK-NEXT: vmov r2, s0
10 ; CHECK-NEXT: sxth r1, r1
11 ; CHECK-NEXT: sxth r2, r2
12 ; CHECK-NEXT: rsbs r1, r1, #0
13 ; CHECK-NEXT: rsbs r2, r2, #0
14 ; CHECK-NEXT: sxth r1, r1
15 ; CHECK-NEXT: sxth r2, r2
16 ; CHECK-NEXT: asr.w r12, r1, #31
17 ; CHECK-NEXT: asrs r3, r2, #31
18 ; CHECK-NEXT: strd r2, r3, [r0]
19 ; CHECK-NEXT: strd r1, r12, [r0, #8]
22 %wide.load = load <2 x i64>, <2 x i64>* undef, align 8
23 %0 = trunc <2 x i64> %wide.load to <2 x i32>
24 %1 = shl <2 x i32> %0, <i32 16, i32 16>
25 %2 = ashr exact <2 x i32> %1, <i32 16, i32 16>
26 %3 = sub <2 x i32> %2, %0
27 %4 = and <2 x i32> %3, <i32 7, i32 7>
28 %5 = shl <2 x i32> %2, %4
29 %6 = extractelement <2 x i32> %5, i32 0
30 %7 = zext i32 %6 to i64
31 %8 = select i1 false, i64 %7, i64 undef
32 %9 = trunc i64 %8 to i16
34 %11 = sext i16 %10 to i64
35 %12 = getelementptr inbounds i64, i64* %d, i64 undef
36 store i64 %11, i64* %12, align 8
37 %13 = extractelement <2 x i32> %5, i32 1
38 %14 = zext i32 %13 to i64
39 %15 = select i1 false, i64 %14, i64 undef
40 %16 = trunc i64 %15 to i16
42 %18 = sext i16 %17 to i64
44 %20 = sext i32 %19 to i64
45 %21 = getelementptr inbounds i64, i64* %d, i64 %20
46 store i64 %18, i64* %21, align 8