1 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-linux-gnu < %s \
2 ; RUN: 2>&1 | FileCheck --check-prefix=CHECK-LE %s
3 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-ibm-aix-xcoff < %s \
4 ; RUN: 2>&1 | FileCheck --check-prefix=CHECK-BE %s
6 ; CHECK-NOT: warning: {{.*}} stack frame size ({{.*}}) exceeds limit (4294967295) in function 'foo'
7 ; CHECK-NOT: warning: {{.*}} stack frame size ({{.*}}) exceeds limit (4294967295) in function 'large_stack'
8 ; CHECK: warning: {{.*}} stack frame size ({{.*}}) exceeds limit (4294967295) in function 'warn_on_large_stack'
10 declare void @bar(ptr)
12 define void @foo(i8 %x) {
13 ; CHECK-LE-LABEL: foo:
14 ; CHECK-LE: # %bb.0: # %entry
15 ; CHECK-LE-NEXT: lis 0, -1
16 ; CHECK-LE-NEXT: ori 0, 0, 65534
17 ; CHECK-LE-NEXT: sldi 0, 0, 32
18 ; CHECK-LE-NEXT: oris 0, 0, 65535
19 ; CHECK-LE-NEXT: ori 0, 0, 65504
20 ; CHECK-LE-NEXT: stdux 1, 1, 0
21 ; CHECK-LE-NEXT: .cfi_def_cfa_offset 4294967328
22 ; CHECK-LE-NEXT: li 4, 1
23 ; CHECK-LE-NEXT: addi 5, 1, 32
24 ; CHECK-LE-NEXT: stb 3, 32(1)
25 ; CHECK-LE-NEXT: rldic 4, 4, 31, 32
26 ; CHECK-LE-NEXT: stbx 3, 5, 4
27 ; CHECK-LE-NEXT: li 4, -1
28 ; CHECK-LE-NEXT: rldic 4, 4, 0, 32
29 ; CHECK-LE-NEXT: stbx 3, 5, 4
30 ; CHECK-LE-NEXT: ld 1, 0(1)
33 ; CHECK-BE-LABEL: foo:
34 ; CHECK-BE: # %bb.0: # %entry
35 ; CHECK-BE-NEXT: lis 0, -1
36 ; CHECK-BE-NEXT: ori 0, 0, 65534
37 ; CHECK-BE-NEXT: sldi 0, 0, 32
38 ; CHECK-BE-NEXT: oris 0, 0, 65535
39 ; CHECK-BE-NEXT: ori 0, 0, 65488
40 ; CHECK-BE-NEXT: stdux 1, 1, 0
41 ; CHECK-BE-NEXT: li 4, 1
42 ; CHECK-BE-NEXT: addi 5, 1, 48
43 ; CHECK-BE-NEXT: rldic 4, 4, 31, 32
44 ; CHECK-BE-NEXT: stb 3, 48(1)
45 ; CHECK-BE-NEXT: stbx 3, 5, 4
46 ; CHECK-BE-NEXT: li 4, -1
47 ; CHECK-BE-NEXT: rldic 4, 4, 0, 32
48 ; CHECK-BE-NEXT: stbx 3, 5, 4
49 ; CHECK-BE-NEXT: ld 1, 0(1)
52 %a = alloca i8, i64 4294967296, align 16
53 %c = getelementptr i8, ptr %a, i64 2147483648
54 %d = getelementptr i8, ptr %a, i64 4294967295
55 store volatile i8 %x, ptr %a
56 store volatile i8 %x, ptr %c
57 store volatile i8 %x, ptr %d
61 define ptr @large_stack() {
62 %s = alloca [281474976710656 x i8], align 1
63 %e = getelementptr i8, ptr %s, i64 0
67 define ptr @warn_on_large_stack() "warn-stack-size"="4294967295" {
68 %s = alloca [281474976710656 x i8], align 1
69 %e = getelementptr i8, ptr %s, i64 0