1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -O0 -mtriple=aarch64-unknown-linux-gnu < %s | FileCheck %s --check-prefix=GISEL
3 ; RUN: llc -O0 -global-isel=0 -mtriple=aarch64-unknown-linux-gnu < %s | FileCheck %s --check-prefix=SDAG
5 ; Verify that GISel and SDAG do the same thing for this phi (modulo regalloc)
6 define void @test() nounwind {
8 ; GISEL: // %bb.0: // %entry
9 ; GISEL-NEXT: sub sp, sp, #16
10 ; GISEL-NEXT: mov x8, xzr
11 ; GISEL-NEXT: mov x9, x8
12 ; GISEL-NEXT: str x9, [sp] // 8-byte Folded Spill
13 ; GISEL-NEXT: str x8, [sp, #8] // 8-byte Folded Spill
14 ; GISEL-NEXT: b .LBB0_1
15 ; GISEL-NEXT: .LBB0_1: // %loop
16 ; GISEL-NEXT: // =>This Inner Loop Header: Depth=1
17 ; GISEL-NEXT: ldr x8, [sp, #8] // 8-byte Folded Reload
18 ; GISEL-NEXT: ldr x9, [sp] // 8-byte Folded Reload
19 ; GISEL-NEXT: str x9, [sp] // 8-byte Folded Spill
20 ; GISEL-NEXT: str x8, [sp, #8] // 8-byte Folded Spill
21 ; GISEL-NEXT: b .LBB0_1
24 ; SDAG: // %bb.0: // %entry
25 ; SDAG-NEXT: sub sp, sp, #16
26 ; SDAG-NEXT: mov x1, xzr
27 ; SDAG-NEXT: mov x0, x1
28 ; SDAG-NEXT: str x1, [sp] // 8-byte Folded Spill
29 ; SDAG-NEXT: str x0, [sp, #8] // 8-byte Folded Spill
30 ; SDAG-NEXT: b .LBB0_1
31 ; SDAG-NEXT: .LBB0_1: // %loop
32 ; SDAG-NEXT: // =>This Inner Loop Header: Depth=1
33 ; SDAG-NEXT: ldr x0, [sp, #8] // 8-byte Folded Reload
34 ; SDAG-NEXT: ldr x1, [sp] // 8-byte Folded Reload
35 ; SDAG-NEXT: str x1, [sp] // 8-byte Folded Spill
36 ; SDAG-NEXT: str x0, [sp, #8] // 8-byte Folded Spill
37 ; SDAG-NEXT: b .LBB0_1
42 %p = phi i72 [ 0, %entry ], [ %p, %loop ]