1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 3
2 ; RUN: llc < %s -mtriple=aarch64-none-linux-gnu -global-isel | FileCheck %s
3 define void @test_oversized(ptr %dst, i32 %cond) {
4 ; CHECK-LABEL: test_oversized:
5 ; CHECK: // %bb.0: // %entry
6 ; CHECK-NEXT: stp x29, x30, [sp, #-16]! // 16-byte Folded Spill
7 ; CHECK-NEXT: mov x29, sp
8 ; CHECK-NEXT: sub sp, sp, #32
9 ; CHECK-NEXT: .cfi_def_cfa w29, 16
10 ; CHECK-NEXT: .cfi_offset w30, -8
11 ; CHECK-NEXT: .cfi_offset w29, -16
12 ; CHECK-NEXT: mov x8, sp
13 ; CHECK-NEXT: mov x9, #2305843009213693952 // =0x2000000000000000
14 ; CHECK-NEXT: sub x8, x8, x9
15 ; CHECK-NEXT: sub x9, x29, #32
16 ; CHECK-NEXT: mov sp, x8
17 ; CHECK-NEXT: cmp w1, #0
18 ; CHECK-NEXT: csel x8, x9, x8, eq
19 ; CHECK-NEXT: str x8, [x0]
20 ; CHECK-NEXT: mov sp, x29
21 ; CHECK-NEXT: ldp x29, x30, [sp], #16 // 16-byte Folded Reload
24 %0 = alloca [8 x i32], i32 1, align 4
25 %tobool = icmp ne i32 %cond, 0
26 br i1 %tobool, label %if.then, label %if.end
29 %vla1 = alloca [18446744073709551615 x i32], i32 1, align 4
33 %arr = phi ptr [%0, %entry], [%vla1, %if.then]
34 store ptr %arr, ptr %dst