1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -o - %s -mtriple=riscv64 -mattr=+c -simplify-mir \
3 # RUN: -run-pass=riscv-make-compressible | FileCheck %s
5 define void @foo(ptr noundef %ptr) #0 {
7 %0 = ptrtoint ptr %ptr to i64
8 %1 = getelementptr inbounds i64, ptr %ptr, i64 100
9 store i64 1, ptr %1, align 8
10 %2 = getelementptr inbounds i64, ptr %ptr, i64 101
11 store i64 %0, ptr %2, align 8
12 %3 = getelementptr inbounds i64, ptr %ptr, i64 102
13 store i64 2, ptr %3, align 8
17 attributes #0 = { minsize }
23 tracksRegLiveness: true
30 ; CHECK-LABEL: name: foo
31 ; CHECK: liveins: $x10
33 ; CHECK-NEXT: renamable $x11 = ADDI $x0, 1
34 ; CHECK-NEXT: $x12 = ADDI $x10, 768
35 ; CHECK-NEXT: SD killed renamable $x11, $x12, 32 :: (store (s64) into %ir.1)
36 ; CHECK-NEXT: SD renamable $x10, $x12, 40 :: (store (s64) into %ir.2)
37 ; CHECK-NEXT: renamable $x11 = ADDI $x0, 2
38 ; CHECK-NEXT: SD killed renamable $x11, killed $x12, 48 :: (store (s64) into %ir.3)
39 ; CHECK-NEXT: PseudoRET
40 renamable $x11 = ADDI $x0, 1
41 SD killed renamable $x11, renamable $x10, 800 :: (store (s64) into %ir.1)
42 SD renamable $x10, renamable $x10, 808 :: (store (s64) into %ir.2)
43 renamable $x11 = ADDI $x0, 2
44 SD killed renamable $x11, killed renamable $x10, 816 :: (store (s64) into %ir.3)