[PATCH] D143726: [LICM] Simplify (X < A && X < B) into (X < MIN(A, B)) if MIN(A, B) is loop-invariant
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 9 22:01:04 PST 2023
mkazantsev marked an inline comment as done.
mkazantsev added inline comments.
================
Comment at: llvm/test/Transforms/LICM/min_max.ll:482
ret i32 %iv
}
----------------
nikic wrote:
> Some missing negative tests:
> * Equality predicate
> * Multi-use comparison
> * Logical and/or (mentioned above)
> * Swapped operands (but better implement support...)
> * One icmp without invariant ops
> * Mismatched predicates (e.g. one ult one ule)
> * No common variant operand
Actually some of them can be optimized, I'll add both positive and negative tests for these situations.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143726/new/
https://reviews.llvm.org/D143726
More information about the llvm-commits
mailing list