[PATCH] D150855: MachineCombiner: consider all uses in getLatency()
Sergei Barannikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 18 05:16:02 PDT 2023
barannikov88 added a comment.
In D150855#4352644 <https://reviews.llvm.org/D150855#4352644>, @artagnon wrote:
> There are no test changes, but Embench shows a minor improvement in one test.
Can this test be reduced and added to the review? I'm afraid this can't proceed without test coverage.
================
Comment at: llvm/lib/CodeGen/MachineCombiner.cpp:286
+ NewRoot, NewRoot->findRegisterDefOperandIdx(MO.getReg()), &UseInstr,
+ MO.getOperandNo());
+ } else {
----------------
This now gets the operand number of the defining instruction. We need the operand number of the using instruction here; it is likely to be different.
Please consider using `use_nodbg_operands`. You can get the UseInstr from it by calling `UseMO.getParent()`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150855/new/
https://reviews.llvm.org/D150855
More information about the llvm-commits
mailing list