[llvm] [AMDGPU][NFC] Pre-commit test for spilling a read-undef IMPLICIT_DEF (PR #227858)

Pablo Reble via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 2 07:02:03 PDT 2026


reble wrote:

> Does this mean you're intending to special case spills of IMPLICIT_DEF? I don't think that's necessarily valid.
> 
> CodeGen as a whole doesn't properly handle poison vs. undef, and the status quo is approximately that IMPLICIT_DEF is poison, but undef is also selected to IMPLICIT_DEF

Is the concern specific to the read-undef subreg case, or does it also apply to the existing handling of a full `IMPLICIT_DEF` in `isRealSpill` (c668935d85bc), which already emits a `KILL` instead of a store? The fix I'm planning to post after this test would handle `undef %0.sub0 = IMPLICIT_DEF` the same way.

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


More information about the llvm-commits mailing list