[PATCH] D57478: GlobalISel: Implement fewerElementsVector for shifts
Amara Emerson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 1 16:04:09 PST 2019
aemerson added inline comments.
================
Comment at: include/llvm/CodeGen/GlobalISel/LegalizerHelper.h:162
+ /// Legalize a instruction with a vector type where each operand may have a
+ /// different element type type. All operands must have the same number of
+ /// elements.
----------------
type type
================
Comment at: lib/CodeGen/GlobalISel/LegalizerHelper.cpp:1816
+LegalizerHelper::LegalizeResult LegalizerHelper::fewerElementsVectorMultiType(
+ MachineInstr &MI, unsigned TypeIdx, LLT NarrowTyArg) {
----------------
I'm finding it difficult to tell exactly what this function is trying to do. Can we have some comments throughout to explain what each phase is trying to achieve, with a small example if it's not clear enough from prose.
================
Comment at: lib/CodeGen/GlobalISel/LegalizerHelper.cpp:1850
+ LeftoverRegs))
+ llvm_unreachable("should have been able to extractParts");
+
----------------
We can return 0 here to fall back instead of dying.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57478/new/
https://reviews.llvm.org/D57478
More information about the llvm-commits
mailing list