[PATCH] D105347: [AMDGPU][GlobalISel] Legalization of G_ROTL and G_ROTR

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 27 07:00:25 PDT 2021


foad accepted this revision.
foad added a comment.
This revision is now accepted and ready to land.

LGTM, thanks!



================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:6092
+    // If a funnel shift in the other direction is supported, use it.
+    if (!IsFShLegal) {
+      if (isPowerOf2_32(EltSizeInBits)) {
----------------
Nit: this would be slightly neater:
```
if (IsFshLegal) {
  return ...
} else if (isPowerOf2_32(EltSizeInBits)) {
  return ...
}
```


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

https://reviews.llvm.org/D105347



More information about the llvm-commits mailing list