[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
Fri Feb 25 09:33:43 PST 2022
matejam added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUPostLegalizerCombiner.cpp:334
+
+ auto HiAndLoHaveSameSrc = [&]() {
+ if (Register HiSrcReg = isLshrBy16(*HiMI))
----------------
foad wrote:
> It's a bit strange to define a lambda that is only used once.
Thanks, I'll remove the lambda.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUPostLegalizerCombiner.cpp:344-347
+ if (Register Reg = isLshrBy16(*HiMI)) {
+ MatchInfo = {MRI.getVRegDef(Reg), false};
+ return true;
+ }
----------------
foad wrote:
> What is this part for? It only seems to affect the specially constructed test cases in combine-or-and-shl.mir. Does it ever help with real code?
You're right, I'll remove that.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118351/new/
https://reviews.llvm.org/D118351
More information about the llvm-commits
mailing list