[llvm] 993792b - [SCEV] Don't consider umin_seq scev expr to be more complex that ptrtoint scev expr
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 13 13:00:07 PST 2022
Author: Roman Lebedev
Date: 2022-01-13T23:59:47+03:00
New Revision: 993792bd1affe3cf13ce3b9d71250235cd0d029e
URL: https://github.com/llvm/llvm-project/commit/993792bd1affe3cf13ce3b9d71250235cd0d029e
DIFF: https://github.com/llvm/llvm-project/commit/993792bd1affe3cf13ce3b9d71250235cd0d029e.diff
LOG: [SCEV] Don't consider umin_seq scev expr to be more complex that ptrtoint scev expr
Let's consider sequential min/max expression family
to be more complex than their non-sequential counterparts,
preserving internal ordering within them.
Added:
Modified:
llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h
llvm/test/Analysis/ScalarEvolution/exit-count-select-safe.ll
Removed:
################################################################################
diff --git a/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h b/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h
index 4416fdb7c08aa..27542bc554207 100644
--- a/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h
+++ b/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h
@@ -50,8 +50,8 @@ enum SCEVTypes : unsigned short {
scSMaxExpr,
scUMinExpr,
scSMinExpr,
- scPtrToInt,
scSequentialUMinExpr,
+ scPtrToInt,
scUnknown,
scCouldNotCompute
};
diff --git a/llvm/test/Analysis/ScalarEvolution/exit-count-select-safe.ll b/llvm/test/Analysis/ScalarEvolution/exit-count-select-safe.ll
index 629b2921cf459..1de3014bebce8 100644
--- a/llvm/test/Analysis/ScalarEvolution/exit-count-select-safe.ll
+++ b/llvm/test/Analysis/ScalarEvolution/exit-count-select-safe.ll
@@ -429,7 +429,7 @@ define i64 @uminseq_vs_ptrtoint_complexity(i64 %n, i64 %m, i64* %ptr) {
; CHECK-NEXT: %ptr.int = ptrtoint i64* %ptr to i64
; CHECK-NEXT: --> (ptrtoint i64* %ptr to i64) U: full-set S: full-set
; CHECK-NEXT: %r = add i64 %i, %ptr.int
-; CHECK-NEXT: --> {(ptrtoint i64* %ptr to i64),+,1}<%loop> U: full-set S: full-set --> ((ptrtoint i64* %ptr to i64) + (%n umin_seq %m)) U: full-set S: full-set
+; CHECK-NEXT: --> {(ptrtoint i64* %ptr to i64),+,1}<%loop> U: full-set S: full-set --> ((%n umin_seq %m) + (ptrtoint i64* %ptr to i64)) U: full-set S: full-set
; CHECK-NEXT: Determining loop execution counts for: @uminseq_vs_ptrtoint_complexity
; CHECK-NEXT: Loop %loop: backedge-taken count is (%n umin_seq %m)
; CHECK-NEXT: Loop %loop: max backedge-taken count is -1
More information about the llvm-commits
mailing list