[PATCH] D11860: [SCEV] Apply NSW and NUW flags via poison value analysis for sub, mul and shl
Bjarke Hammersholt Roune via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 14 11:27:45 PDT 2015
broune marked an inline comment as done.
broune added a comment.
Thank you to Sanjoy for the review!
================
Comment at: test/Analysis/ScalarEvolution/min-max-exprs.ll:36
@@ -35,3 +35,3 @@
; CHECK: select i1 %tmp4, i64 %tmp5, i64 %tmp6
-; CHECK-NEXT: --> (-1 + (-1 * ((-1 + (-1 * (sext i32 {3,+,1}<nw><%bb1> to i64))) smax (-1 + (-1 * (sext i32 %N to i64))))))
+; CHECK-NEXT: --> (-1 + (-1 * ((-1 + (-1 * (sext i32 {3,+,1}<nw><%bb1> to i64))<nsw>) smax (-1 + (-1 * (sext i32 %N to i64))<nsw>)))<nsw>)
%tmp11 = getelementptr inbounds i32, i32* %A, i64 %tmp9
----------------
sanjoy wrote:
> I'm surprised this changed in the last version -- I think you only made SCEV more conservative in this last revision?
The NSW on the negation is now applied (if it can be proven) even if the subtraction does not have a NSW flag.
http://reviews.llvm.org/D11860
More information about the llvm-commits
mailing list