[llvm] X86: Mark flag clobbers dead in stack probe expansion (PR #227682)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 4 00:13:54 PDT 2026


arsenm wrote:

> `setOperandDead(MagicNumber)` is not the most readable. What would a decent "eflags dead" abstraction look like? Something in TII? 

There are several other APIs you can use to name EFLAGS all of which have an additional compile-time cost I do not think is worth it. I added setImplicitPhysRegDefsDead for the cases where you don't know the literal opcode, but that is still embedding the assumption that you want to make all of the defs dead. I've fixed most of the dropped dead flags and just used the index where the opcode is obvious.

> because eflags is such an x86-specific concept.

It's not really because every single target has condition registers 

I'm debating making wholly accurate dead flags a verifier enforced condition, part of which would be physical register operands would be dead by default and need explicit action to use 

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


More information about the llvm-commits mailing list