[PATCH] D126661: [MachineVerifier] Fix crash on early clobbered subreg operands.
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 5 01:36:07 PDT 2022
foad added inline comments.
================
Comment at: llvm/lib/CodeGen/MachineVerifier.cpp:2266
+ // somewhere is performed in visitMachineFunctionAfter()
+ if (((SubRangeCheck || MO->getSubReg() == 0) && (VNI->def != DefIdx)) ||
+ !SlotIndex::isSameInstr(VNI->def, DefIdx) ||
----------------
Don't need the last set of parens on this line.
================
Comment at: llvm/lib/CodeGen/MachineVerifier.cpp:2269
+ (VNI->def != DefIdx &&
+ !(VNI->def.isEarlyClobber() && DefIdx > VNI->def))) {
report("Inconsistent valno->def", MO, MONum);
----------------
dfukalov wrote:
> @foad would you please approve the condition means your suggestion "VNI-def is the early clobber slot and DefIdx is the normal slot"?
Looks OK but I think `(!VNI->def.isEarlyClobber() || !DefIdx.isRegister())` might be clearer.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126661/new/
https://reviews.llvm.org/D126661
More information about the llvm-commits
mailing list