[PATCH] D157591: [AArch64][GlobalISel] Optimize Combine Funnel Shift
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 11 00:17:34 PDT 2023
dmgreen added a comment.
Is it possible to add a vector test to the mir tests too?
================
Comment at: llvm/include/llvm/Target/GlobalISel/Combine.td:387
+// Fold fshr x, y, 0 -> y
+def funnel_shift_right_zero: GICombineRule<
+ (defs root:$root),
----------------
I would move these down to next to the other funnel shift combines
================
Comment at: llvm/include/llvm/Target/GlobalISel/Combine.td:843
def funnel_shift_combines : GICombineGroup<[funnel_shift_from_or_shift,
- funnel_shift_to_rotate]>;
+ funnel_shift_to_rotate, funnel_shift_right_zero, funnel_shift_left_zero, funnel_shift_overshift]>;
----------------
Can you format this to be a shorter line.
================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:2623
+
+ // Get the information needed
+ Register ConstReg = MI.getOperand(3).getReg();
----------------
This comment maybe doesn't add much
================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:2631
+
+ APInt NewConst = VRegAndVal->Value.urem(
+ APInt(ConstTy.getSizeInBits(), DstTy.getSizeInBits()));
----------------
It would be good to have a comment here that explains what this is doing.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157591/new/
https://reviews.llvm.org/D157591
More information about the llvm-commits
mailing list