[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 03:12:39 PST 2022
matejam added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUPostLegalizerCombiner.cpp:310-312
+ if (FCanonOpMI->getOpcode() == TargetOpcode::G_BITCAST)
+ TmpReg = FCanonOpMI->getOperand(1).getReg();
+ return TLI->isCanonicalized(TmpReg, MF);
----------------
arsenm wrote:
> What's the point of this change? I don't think this is really correct since a bitcast from <2 x s16> to s32 won't have a consistent canonicalized interpretation
You're right, I'll remove that.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUPostLegalizerCombiner.cpp:356
+ return true;
+ } else {
+ MatchInfo = {HiMI, true};
----------------
arsenm wrote:
> No else after return
Thanks!
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUPostLegalizerCombiner.cpp:405
+
+ MI.eraseFromParent();
}
----------------
arsenm wrote:
> Missing return value
Most of the apply functions are void and don't have the return statement.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118351/new/
https://reviews.llvm.org/D118351
More information about the llvm-commits
mailing list