[PATCH] D111191: [SCEV] Search operand tree for scope bound when inferring flags from IR

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 6 15:06:46 PDT 2021


xbolva00 added inline comments.


================
Comment at: llvm/test/Analysis/LoopAccessAnalysis/memcheck-wrapping-pointers.ll:19
 ; %arrayidx4 in the test. The SCEV expressions for these are:
 ;  ((4 * (zext i32 {1,+,1}<%for.body> to i64))<nuw><nsw> + %a)<nsw>
 ;  ((4 * (zext i32 {0,+,1}<%for.body> to i64))<nuw><nsw> + %b)<nsw>
----------------
Here we say nsw


================
Comment at: llvm/test/Analysis/LoopAccessAnalysis/memcheck-wrapping-pointers.ll:48
 ; CHECK-NEXT:    [PSE]  %arrayidx = getelementptr inbounds i32, i32* %a, i64 %idxprom:
-; CHECK-NEXT:      ((4 * (zext i32 {1,+,1}<%for.body> to i64))<nuw><nsw> + %a)
+; CHECK-NEXT:      ((4 * (zext i32 {1,+,1}<%for.body> to i64))<nuw><nsw> + %a)<nuw>
 ; CHECK-NEXT:      --> {(4 + %a),+,4}<%for.body>
----------------
And here nuw.. 

Suspicous.


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

https://reviews.llvm.org/D111191



More information about the llvm-commits mailing list