[llvm] 054d7b1 - [X86] Add huge-stack.ll test coverage from #84114

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 15 03:31:37 PDT 2024


Author: Simon Pilgrim
Date: 2024-07-15T11:31:01+01:00
New Revision: 054d7b1283a5ebdf724f3ebc38b47e419f8f7a7f

URL: https://github.com/llvm/llvm-project/commit/054d7b1283a5ebdf724f3ebc38b47e419f8f7a7f
DIFF: https://github.com/llvm/llvm-project/commit/054d7b1283a5ebdf724f3ebc38b47e419f8f7a7f.diff

LOG: [X86] Add huge-stack.ll test coverage from #84114

Ensure we have -verify-machineinstrs to avoid EXPENSIVE_CHECKS fails

Added: 
    llvm/test/CodeGen/X86/huge-stack.ll

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/X86/huge-stack.ll b/llvm/test/CodeGen/X86/huge-stack.ll
new file mode 100644
index 0000000000000..a7ceb4a4ee6fe
--- /dev/null
+++ b/llvm/test/CodeGen/X86/huge-stack.ll
@@ -0,0 +1,24 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --no_x86_scrub_sp --version 4
+; RUN: llc -O0 -mtriple=x86_64 -verify-machineinstrs < %s | FileCheck %s --check-prefix=CHECK
+%large = type [4294967295 x i8]
+
+define void @foo() unnamed_addr #0 {
+; CHECK-LABEL: foo:
+; CHECK:       # %bb.0:
+; CHECK-NEXT:    movabsq $8589934462, %rax # imm = 0x1FFFFFF7E
+; CHECK-NEXT:    subq %rax, %rsp
+; CHECK-NEXT:    .cfi_def_cfa_offset -122
+; CHECK-NEXT:    movb $42, -129(%rsp)
+; CHECK-NEXT:    movb $43, -128(%rsp)
+; CHECK-NEXT:    movabsq $8589934462, %rax # imm = 0x1FFFFFF7E
+; CHECK-NEXT:    addq %rax, %rsp
+; CHECK-NEXT:    .cfi_def_cfa_offset 8
+; CHECK-NEXT:    retq
+  %1 = alloca %large, align 1
+  %2 = alloca %large, align 1
+  %3 = getelementptr inbounds %large, ptr %1, i64 0, i64 0
+  store i8 42, ptr %3, align 1
+  %4 = getelementptr inbounds %large, ptr %2, i64 0, i64 0
+  store i8 43, ptr %4, align 1
+  ret void
+}


        


More information about the llvm-commits mailing list