[PATCH] D35256: [SCEV] Try harder to preserve NSW information for sext(sub) expressions
Amara Emerson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 1 05:38:31 PDT 2017
aemerson added inline comments.
================
Comment at: test/Analysis/ScalarEvolution/flags-from-poison.ll:612
; CHECK: %index64 =
-; CHECK: --> {(sext i32 (-1 * %sub) to i64),+,1}<nsw>
+; CHECK: --> {(-1 * (sext i32 %sub to i64))<nsw>,+,1}<nsw
%index64 = sext i32 %index32 to i64
----------------
sanjoy wrote:
> Please add a test case that uses `Intrinsic::ssub_with_overflow`.
I see the code in MatchBinaryOperator doesn't seem to check for guard edges of the `ssub_with_overflow` intrinsic's overflow return value like it does for `sadd_with_overflow`. Is there a reason why it doesn't do that, if not I'll go and add support for it.
Without that modification it looks like intrinsic test case won't work.
Repository:
rL LLVM
https://reviews.llvm.org/D35256
More information about the llvm-commits
mailing list