[PATCH] D74320: GlobalISel: Add combine to narrow G_LSHR
Nicolai Hähnle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 16 10:00:08 PST 2020
nhaehnle accepted this revision.
nhaehnle added a comment.
This revision is now accepted and ready to land.
Some nits, but generally LGTM.
================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:1405-1407
+bool CombinerHelper::matchCombineShiftToUnmerge(MachineInstr &MI,
+ unsigned TargetShiftSize,
+ unsigned &ShiftVal) {
----------------
Please add a comment describing what this matches.
================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:1448
+ Narrowed = Builder.buildLShr(
+ HalfTy, Unmerge.getReg(1),
+ Builder.buildConstant(HalfTy, ShiftVal - Size / 2)).getReg(0);
----------------
This could use `Narrowed` instead of `Unmerge.getReg(1)`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74320/new/
https://reviews.llvm.org/D74320
More information about the llvm-commits
mailing list