[PATCH] D61934: [SCEV] Use wrap flags in InsertBinop

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 5 01:52:05 PDT 2019


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


================
Comment at: lib/Analysis/ScalarEvolutionExpander.cpp:865
                          ConstantInt::get(Ty, RHS.logBase2()),
-                         /*IsSafeToHoist*/ true);
+                         SCEV::FlagNW, /*IsSafeToHoist*/ true);
   }
----------------
nikic wrote:
> samparker wrote:
> > nikic wrote:
> > > Should be FlagAnyWrap?
> > Neither lshr or udiv wrap, they only support 'exact'.
> Right, that's why you want to pass no flags here, which is what AnyWrap (=0) does. FlagNW is a different kind of nowrap flag that doesn't apply to udiv and has no IR representation anyway.
Ah, okay, thanks!


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

https://reviews.llvm.org/D61934





More information about the llvm-commits mailing list