[llvm] [PEI][PowerPC] Fix false alarm of stack size limit (PR #65559)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 6 21:38:21 PDT 2023


================
@@ -0,0 +1,16 @@
+; RUN: llc -mtriple=powerpc64-unknown-unknown < %s 2>&1 | FileCheck %s
+; RUN: llc -mtriple=powerpc64le-unknown-unknown < %s 2>&1 | FileCheck %s
+
+; CHECK-NOT: warning: {{.*}} stack frame size ({{.*}}) exceeds limit (4294967295) in function 'large_stack'
+define i8* @large_stack() {
+  %s = alloca [281474976710656 x i8], align 1
+  %e = getelementptr i8, i8* %s, i64 0
----------------
MaskRay wrote:

use opaque pointers `ptr`

Does it really work for a larger-than-4G limit? Do you not hit any other limit in LLVM codegen that might assume uint32_t or a smaller limit? You probably want to try more more stack operations.

https://github.com/llvm/llvm-project/pull/65559


More information about the llvm-commits mailing list