[llvm] [TableGen] Diagnose sub-register indices that overflow their register (PR #206346)

Taimuraz Kaitmazov via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 28 16:42:55 PDT 2026


atassis wrote:

Hi @jurahul, you maintain TableGen so I think you're the right person to ask. Would you have a chance to look at this one? 
It catches a SubRegIndex whose Size is larger than the register it describes. I ran into it as a silent miscompile downstream (a 64-bit field got declared as 576 bits), which took a hardware repro to find, so I'd rather have it fail at build time. I checked it against all the in-tree targets and the TableGen test suite and nothing else trips on it.

The one thing I'm unsure about is whether it should be a hard error or a warning. I went with a hard error for now, but happy to switch if you'd rather. Thanks, and no worries on timing.

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


More information about the llvm-commits mailing list