[PATCH] D151036: [CodeGen] Fix incorrect usage of MCPhysReg for diff list elements
Sergei Barannikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 22 21:00:58 PDT 2023
barannikov88 added a comment.
The issue with the buildbot breakage is that `needsStackFrame` in `HexagonFrameLowering.cpp` calls `subregs_inclusive` for the zero register.
https://github.com/llvm/llvm-project/blob/14bc3748109c73adde7350da60366149ae0d4c3a/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp#L314
It used to work because `MCRegisterDesc` for the zero register referred to the beginning of the `DiffList` array, where it contained two consecutive zeros.
The effect was as if the zero register didn't have any sub- or super-registers.
After this patch, these two zero entries are no longer emitted.
It feels like `subregs_inclusive` and related methods (and maybe even `MCRegisterInfo::get`) should not allow zero register input,
but it appears that many places rely on this behavior (probably unintended). Fixing all this places is out of scope of this patch,
so I'll just restore the original behavior by special-casing zero register input with a fixme.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151036/new/
https://reviews.llvm.org/D151036
More information about the llvm-commits
mailing list