[PATCH] D57559: GlobalISel: Implement narrowScalar for shift main type
Amara Emerson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 6 15:09:31 PST 2019
aemerson added inline comments.
================
Comment at: include/llvm/CodeGen/GlobalISel/LegalizerHelper.h:178
+ LegalizeResult narrowScalarShifByConstant(MachineInstr &MI, const APInt &Amt,
+ LLT HalfTy, LLT ShiftAmtTy);
----------------
Typo s/Shif/Shift
================
Comment at: lib/CodeGen/GlobalISel/LegalizerHelper.cpp:2370
+ const unsigned NewBitSize = DstEltSize / 2;
+ if (2 * NewBitSize != DstEltSize)
+ return UnableToLegalize;
----------------
Maybe `if (DstEltSize % 2 != 0)` is clearer?
================
Comment at: lib/CodeGen/GlobalISel/LegalizerHelper.cpp:2461
+
+ ResultRegs[0] = Lo->getOperand(0).getReg();
+ ResultRegs[1] = Hi->getOperand(0).getReg();
----------------
These can now be replaced with the new Lo->getReg(0) helper.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57559/new/
https://reviews.llvm.org/D57559
More information about the llvm-commits
mailing list