[PATCH] D146930: [MCP] Do not try forward non-existent sub-register of a copy
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 27 19:49:04 PDT 2023
arsenm accepted this revision.
arsenm added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/lib/CodeGen/MachineCopyPropagation.cpp:651
+ unsigned SubRegIdx = TRI->getSubRegIndex(CopyDstReg, MOUse.getReg());
+ assert(SubRegIdx && "findAvailCopy returned unrelated instruction");
+ ForwardedReg = TRI->getSubReg(CopySrcReg, SubRegIdx);
----------------
Don't really understand the assert message here (plus I thought getSubRegIndex could deal with the 0 case anyway)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146930/new/
https://reviews.llvm.org/D146930
More information about the llvm-commits
mailing list