[PATCH] D153540: [LoopUnroll] Fold add chains during unrolling

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 30 08:57:55 PDT 2023


fhahn accepted this revision.
fhahn added a comment.
This revision is now accepted and ready to land.

LGTM, thanks!



================
Comment at: llvm/lib/Transforms/Utils/LoopUnroll.cpp:258
+          auto *InnerOBO = cast<OverflowingBinaryOperator>(Inst.getOperand(0));
+          bool SignedOverflow;
+          APInt NewC = C1->sadd_ov(*C2, SignedOverflow);
----------------
Do we have any tests where there's a signed overflow here? Would be good to make sure this is covered in the tests.


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

https://reviews.llvm.org/D153540



More information about the llvm-commits mailing list