[PATCH] D90217: [AMDGPU][GlobalISel] Fold a chain of two shift instructions with constant operands

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 28 01:45:35 PDT 2020


foad added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:1596-1597
+    }
+    // Arithmetic shift larger than scalar size has no effect.
+    Imm = Ty.getScalarSizeInBits() - 1;
+  }
----------------
You could also handle G_USHLSAT and G_SSHLSAT the same way as G_ASHR.


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

https://reviews.llvm.org/D90217



More information about the llvm-commits mailing list