[PATCH] D101005: [AArch64][GlobalISel] Simplify out of range rotate amount.

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 23 01:19:23 PDT 2021


foad added a comment.

>> What's the point of this? Does it somehow end up generating better code?
>
> It allows us to select immediate forms of rotate instructions for AArch64.

I would expect most targets to handle that during instruction selection by ignoring the high bits of the rotate amount, but perhaps there's some reason why it's awkward to do that for AArch64. Would it make sense for your new combine to be completely AArch64-specific? Currently you have added it to all_combines so it will be run on other targets too.



================
Comment at: llvm/include/llvm/Target/GlobalISel/Combine.td:615
+
+def funnel_shift_combines : GICombineGroup<[funnel_shift_to_rotate, rotate_out_of_range]>;
 
----------------
Seems a bit odd to include this in "funnel_shift_combines" since it doesn't actually touch funnel shifts.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101005/new/

https://reviews.llvm.org/D101005



More information about the llvm-commits mailing list