When propagating undefined copies the undef flag must also be
propagated.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
What happens if you don't do this? Does it fail machine verification? I wonder why this bug hasn't come to light earlier?
Comment Actions
Correct, it fails machine verification.
I suspect this is just a case of no one has generated MIR like this before.
Comment Actions
LGTM.
llvm/lib/CodeGen/MachineCopyPropagation.cpp | ||
---|---|---|
579–580 | MOUse.setIsUndef(CopySrc.isUndef()) would be a bit neater, and the same for isRenamable. Dunno if it makes any practical difference. |
Comment Actions
- Address reviewer comments
llvm/lib/CodeGen/MachineCopyPropagation.cpp | ||
---|---|---|
579–580 | Sure. |
MOUse.setIsUndef(CopySrc.isUndef()) would be a bit neater, and the same for isRenamable. Dunno if it makes any practical difference.