llvm-project/llvm/test/CodeGen/X86/win64-stackprobe-overflow.ll
Wesley Wiser 40a469f79a
Reapply "[X86] Correct 32-bit immediate assertion and fix 64-bit lowering for huge frame offsets" (#152239)
The first commit is identical to
69bec0afbb8f2aa0021d18ea38768360b16583a9.

The second commit fixes the instruction verification failures by
replacing the erroneous instruction with a trap after the error is
reported and adds `-verify-machineinstrs` to the tests added in the
original PR to catch the issue sooner.

After that change, all tests pass with both
`LLVM_ENABLE_EXPENSIVE_CHECKS={On,Off}`.

cc @RKSimon @e-kud @phoebewang @arsenm as reviewers on the original PR
2025-08-11 21:23:44 +05:30

15 lines
364 B
LLVM

; RUN: llc < %s -mtriple=x86_64-windows-gnu | FileCheck %s
define void @foo() unnamed_addr #0 {
start:
%b = alloca i64, align 8
%c = alloca [4294967295 x i8], align 1
ret void
}
attributes #0 = { nonlazybind uwtable "probe-stack"="probe_stack" "target-cpu"="x86-64" }
; CHECK-LABEL: foo:
; CHECK: movabsq $4294967312, %rax
; CHECK-NEXT: callq probe_stack