[PATCH] D75906: [InstCombine] Support vectors in SimplifyAddWithRemainder.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 10 06:24:10 PDT 2020


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


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp:1048
         Value *NewDivisor =
-            ConstantInt::get(X->getType()->getContext(), C0 * C1);
+           Constant::getIntegerValue(X->getType(), C0 * C1);
         return IsSigned ? Builder.CreateSRem(X, NewDivisor, "srem")
----------------
lebedev.ri wrote:
> I think you want `ConstantInt::get(X->getType(), C0 * C1)`
I think they should do the same thing. ConstantInt::get() is a bit shorter though, I've updated the code.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75906





More information about the llvm-commits mailing list