[llvm] [X86] Don't discard over-16 stack alignment for 32-bit interrupt handlers (PR #225366)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 22 07:20:10 PDT 2026


================
@@ -514,9 +514,9 @@ define x86_intrcc void @foo(ptr byval(i8) %frame) {
 ; CHECK32-KNL-NEXT:    pushl %edx ## encoding: [0x52]
 ; CHECK32-KNL-NEXT:    pushl %ecx ## encoding: [0x51]
 ; CHECK32-KNL-NEXT:    pushl %eax ## encoding: [0x50]
-; CHECK32-KNL-NEXT:    andl $-16, %esp ## encoding: [0x83,0xe4,0xf0]
-; CHECK32-KNL-NEXT:    subl $560, %esp ## encoding: [0x81,0xec,0x30,0x02,0x00,0x00]
-; CHECK32-KNL-NEXT:    ## imm = 0x230
+; CHECK32-KNL-NEXT:    andl $-64, %esp ## encoding: [0x83,0xe4,0xc0]
----------------
phoebewang wrote:

Is the change necessary? There's no stack alignment requiement in the IR. The 64-bit is not aligned either. And either the stack 64-byte aligned, we still use VMOVUPS below.

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


More information about the llvm-commits mailing list