[PATCH] D76500: GlobalISel: Lower funnel shifts
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 20 08:38:25 PDT 2020
foad added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:4167-4168
+LegalizerHelper::lowerFunnelShift(MachineInstr &MI) {
+ // G_FSHL: (X << (Z % BW)) | (Y >> (BW - (Z % BW)))
+ // G_FSHR: (X << (BW - (Z % BW))) | (Y >> (Z % BW))
+ Register Dst = MI.getOperand(0).getReg();
----------------
This won't work when Z is 0 if shifting by BW is undefined.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76500/new/
https://reviews.llvm.org/D76500
More information about the llvm-commits
mailing list