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

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 27 07:00:59 PDT 2020


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:1590
+  if (Imm >= Ty.getScalarSizeInBits()) {
+    // Any logical shift that exceeds scalar size will produce zero.
+    if (Opcode != TargetOpcode::G_ASHR) {
----------------
This is undefined, not 0. I don't think this needs to specially consider this case


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

https://reviews.llvm.org/D90217



More information about the llvm-commits mailing list