[PATCH] D146930: [MCP] Do not try forward non-existent sub-register of a copy
Xiang Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 28 16:47:48 PDT 2023
xiangzhangllvm added inline comments.
================
Comment at: llvm/lib/CodeGen/MachineCopyPropagation.cpp:653
+ ForwardedReg = TRI->getSubReg(CopySrcReg, SubRegIdx);
+ if (!ForwardedReg) {
+ LLVM_DEBUG(dbgs() << "MCP: Copy source does not have sub-register "
----------------
I think there is unsafe to use the SubRegIdx when CopySrcReg and CopyDstReg reg are not same regclass or even different size.
I happen to meet this bug in our tests.
Pls refer to https://reviews.llvm.org/D147031
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