[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.
This commit is contained in:
Roman Lebedev 2022-01-13 23:55:00 +03:00
parent f14b575194
commit 993792bd1a
No known key found for this signature in database
GPG Key ID: 083C3EBB4A1689E0
2 changed files with 2 additions and 2 deletions

View File

@ -50,8 +50,8 @@ enum SCEVTypes : unsigned short {
scSMaxExpr,
scUMinExpr,
scSMinExpr,
scPtrToInt,
scSequentialUMinExpr,
scPtrToInt,
scUnknown,
scCouldNotCompute
};

View File

@ -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