[PATCH] D118317: [InstCombine] Fold and-reduce idiom

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 27 04:29:43 PST 2022


mkazantsev added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:5907
+        OpTy->getNumElements() * LHSTy->getElementType()->getIntegerBitWidth();
+    if (DL.isLegalInteger(NumBits)) {
+      auto *ScalarTy = Builder.getIntNTy(NumBits);
----------------
lebedev.ri wrote:
> I suspect this should be relaxed to something like "is less than a legal integer"
I'm not sure what happens if smth like `i63` lives through the pipeline to codegen. Is it ok?


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

https://reviews.llvm.org/D118317



More information about the llvm-commits mailing list