[PATCH] D57109: GlobalISel: Implement fewerElementsVector for select
Volkan Keles via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 29 19:50:38 PST 2019
volkan accepted this revision.
volkan added a comment.
This revision is now accepted and ready to land.
LGTM with a few nits.
================
Comment at: lib/CodeGen/GlobalISel/LegalizerHelper.cpp:1409
+ unsigned NarrowSize = NarrowTy0.getSizeInBits();
+ NumParts = Size / NarrowSize;
+
----------------
Could you move this below the if statement?
================
Comment at: lib/CodeGen/GlobalISel/LegalizerHelper.cpp:1448
+
+ if (CondTy.isVector())
+ MIRBuilder.buildSelect(DstReg, Src0Regs[i], Src1Regs[i], Src2Regs[i]);
----------------
This if-else block can be simplified as:
`MIRBuilder.buildSelect(DstReg, CondTy.isVector() ? Src0Regs[i] : CondReg, Src1Regs[i], Src2Regs[i]);`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57109/new/
https://reviews.llvm.org/D57109
More information about the llvm-commits
mailing list