1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 4
2 # RUN: llc -O2 -mtriple=aarch64 -mcpu=ampere1 -simplify-mir -o - %s -run-pass=aarch64-ldst-opt | FileCheck %s --check-prefixes=CHECK
3 # RUN: llc -O2 -mtriple=aarch64 -simplify-mir -o - %s -run-pass=aarch64-ldst-opt | FileCheck %s --check-prefixes=CHECK-DEFAULT
6 define i32 @ldp_no_size_info(ptr %0) #0 {
7 %2 = ptrtoint ptr %0 to i64
9 %4 = inttoptr i64 %3 to ptr
10 %5 = load i32, ptr %4, align 4
11 %6 = getelementptr inbounds i32, ptr %4, i64 1
12 %7 = load i32, ptr %6, align 4
13 %8 = add nsw i32 %7, %5
19 name: ldp_no_size_info
21 tracksRegLiveness: true
22 tracksDebugUserValues: true
34 ; CHECK-LABEL: name: ldp_no_size_info
37 ; CHECK-NEXT: renamable $x8 = ANDXri killed renamable $x0, 7865
38 ; CHECK-NEXT: renamable $w9 = LDRWui renamable $x8, 0 :: (load unknown-size from %ir.4, align 1)
39 ; CHECK-NEXT: renamable $w8 = LDRWui killed renamable $x8, 1 :: (load unknown-size from %ir.6, align 1)
40 ; CHECK-NEXT: $w0 = ADDWrs killed renamable $w8, killed renamable $w9, 0
41 ; CHECK-NEXT: RET undef $lr, implicit $w0
43 ; CHECK-DEFAULT-LABEL: name: ldp_no_size_info
44 ; CHECK-DEFAULT: liveins: $x0
45 ; CHECK-DEFAULT-NEXT: {{ $}}
46 ; CHECK-DEFAULT-NEXT: renamable $x8 = ANDXri killed renamable $x0, 7865
47 ; CHECK-DEFAULT-NEXT: renamable $w9, renamable $w8 = LDPWi renamable $x8, 0 :: (load unknown-size from %ir.4, align 1), (load unknown-size from %ir.6, align 1)
48 ; CHECK-DEFAULT-NEXT: $w0 = ADDWrs killed renamable $w8, killed renamable $w9, 0
49 ; CHECK-DEFAULT-NEXT: RET undef $lr, implicit $w0
50 renamable $x8 = ANDXri killed renamable $x0, 7865
51 renamable $w9 = LDRWui renamable $x8, 0 :: (load unknown-size from %ir.4)
52 renamable $w8 = LDRWui killed renamable $x8, 1 :: (load unknown-size from %ir.6)
53 $w0 = ADDWrs killed renamable $w8, killed renamable $w9, 0
54 RET undef $lr, implicit $w0