[PATCH] D95286: [LSR] Drop potentially invalid nowrap flags when switching to post-inc IV (PR46943)
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 24 12:56:10 PST 2021
fhahn added inline comments.
================
Comment at: lib/Transforms/Utils/ScalarEvolutionExpander.cpp:1446
+ // those flags for which SCEV has proven that they always hold.
+ if (auto *BO = dyn_cast<BinaryOperator>(Result)) {
+ if (!S->hasNoUnsignedWrap())
----------------
`OverflowingBinaryOperator`?
================
Comment at: test/Transforms/LoopStrengthReduce/X86/pr46943.ll:48
; CHECK-NEXT: call void @use(i8 [[IV]])
-; CHECK-NEXT: [[IV_NEXT]] = add nsw i8 [[IV]], -1
+; CHECK-NEXT: [[IV_NEXT]] = add i8 [[IV]], -1
; CHECK-NEXT: [[CMP:%.*]] = icmp eq i8 [[IV_NEXT]], 127
----------------
Is this transform actually still helpful, if we have to drop flags to do it?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95286/new/
https://reviews.llvm.org/D95286
More information about the llvm-commits
mailing list