[PATCH] D148073: [SCEV] Improve willNotOverflow by checking min/max in wide range with context

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 17 23:22:54 PDT 2023


mkazantsev planned changes to this revision.
mkazantsev added inline comments.


================
Comment at: llvm/test/Transforms/IndVarSimplify/strengthen-overflow.ll:307
 ; CHECK-NEXT:    [[PHI:%.*]] = phi i32 [ [[ADD:%.*]], [[BB2:%.*]] ], [ 0, [[BB:%.*]] ]
-; CHECK-NEXT:    [[SUB:%.*]] = sub nsw i32 [[FREEZE]], [[PHI]]
+; CHECK-NEXT:    [[SUB:%.*]] = sub i32 [[FREEZE]], [[PHI]]
 ; CHECK-NEXT:    [[ICMP:%.*]] = icmp sgt i32 [[SUB]], 1
----------------
Regression.


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

https://reviews.llvm.org/D148073



More information about the llvm-commits mailing list