[PATCH] D118351: [AMDGPU][GlobalISel] Code quality: don't expand G_BUILD_VECTOR_TRUNC if not neccessary
Mateja Marjanovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 24 08:21:30 PST 2022
matejam added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUPostLegalizerCombiner.cpp:322
+ if (MI.getOpcode() == TargetOpcode::G_LSHR) {
+ Register LshrCstReg = getDefIgnoringCopies(MI.getOperand(2).getReg(), MRI)
+ ->getOperand(0)
----------------
arsenm wrote:
> Why use getDefIgnoringCopies instead of directly using mi_match?
In case we have a copy instruction as a second operand of G_LSHR. mi_match would return false, this way we don't have to worry about that.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118351/new/
https://reviews.llvm.org/D118351
More information about the llvm-commits
mailing list