[PATCH] D126056: [InstCombine] [NFC] Move transforms for truncated shifts into narrowBinOp

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 20 10:49:26 PDT 2022


spatel requested changes to this revision.
spatel added a comment.
This revision now requires changes to proceed.

Please make sure there is good test coverage and no compile-time problems before posting a patch for review.



================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp:687
   }
-
+  case Instruction::Shl:
+  case Instruction::LShr:
----------------
This can't be correct - we are replacing `shl` with `lshr`?


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp:709
+      }
+    }
+  }
----------------
This case falls through and creates a compile-time warning (when compiled by clang).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126056



More information about the llvm-commits mailing list