[PATCH] D114634: [SCEV] Turn check in createSimpleAffineAddRec to assertion. (NFC)
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 26 05:24:18 PST 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb927aa69bf2f: [SCEV] Turn check in createSimpleAffineAddRec to assertion. (NFC) (authored by fhahn).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114634/new/
https://reviews.llvm.org/D114634
Files:
llvm/lib/Analysis/ScalarEvolution.cpp
Index: llvm/lib/Analysis/ScalarEvolution.cpp
===================================================================
--- llvm/lib/Analysis/ScalarEvolution.cpp
+++ llvm/lib/Analysis/ScalarEvolution.cpp
@@ -5341,9 +5341,12 @@
// We can add Flags to the post-inc expression only if we
// know that it is *undefined behavior* for BEValueV to
// overflow.
- if (auto *BEInst = dyn_cast<Instruction>(BEValueV))
- if (isLoopInvariant(Accum, L) && isAddRecNeverPoison(BEInst, L))
+ if (auto *BEInst = dyn_cast<Instruction>(BEValueV)) {
+ assert(isLoopInvariant(Accum, L) &&
+ "Accum is defined outside L, but is not invariant?");
+ if (isAddRecNeverPoison(BEInst, L))
(void)getAddRecExpr(getAddExpr(StartVal, Accum), Accum, L, Flags);
+ }
return PHISCEV;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114634.390031.patch
Type: text/x-patch
Size: 789 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211126/a024382b/attachment.bin>
More information about the llvm-commits
mailing list