[PATCH] D136015: [InstCombine] Fold series of instructions into mull

Allen zhong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 17 08:02:37 PDT 2022


Allen marked an inline comment as done.
Allen added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstructionCombining.cpp:856
+Value *InstCombinerImpl::SimplifyMull(BinaryOperator &I) {
+  if (!(I.getType()->isIntegerTy() && I.getType()->getIntegerBitWidth() == 64))
+    return nullptr;
----------------
bcl5980 wrote:
> This pattern can work for any types with even bit width I think, not only i64.
The source https://godbolt.org/z/x5jMhqW8s is equel to an mull operater for two 64bits integer vaules, so it should be fold to similar assemble.
This is the 1st step try to generate the mul, so now I only enable it with i64 as the instruction umulh


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

https://reviews.llvm.org/D136015



More information about the llvm-commits mailing list