[PATCH] D105161: [GlobalISel] Handle more types in narrowScalar for eq/ne G_ICMP
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 29 17:45:39 PDT 2021
arsenm added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:1101-1103
+ Parts.push_back(
+ MIRBuilder.buildXor(NarrowTy, LHSPartRegs[I], RHSPartRegs[I])
+ .getReg(0));
----------------
This line split is really ugly, assign Xor to a variable to put on a different line?
================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:1109
+ // to extend them to the desired size.
+ Parts.push_back(MIRBuilder.buildZExt(NarrowTy, XorH).getReg(0));
+ }
----------------
Could you instead use extractGCDParts/buildLCMMergePieces with zext padding?
================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:1116
+ // the LHS and RHS are not equal.
+ Register Or = MIRBuilder.buildOr(NarrowTy, Parts[0], Parts[1]).getReg(0);
+ for (unsigned I = 2, E = Parts.size(); I < E; ++I)
----------------
auto and drop .getReg()?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105161/new/
https://reviews.llvm.org/D105161
More information about the llvm-commits
mailing list