[all-commits] [llvm/llvm-project] 8f7975: [SCEV] Better preserve wrapping info in SimplifyIC...
Florian Hahn via All-commits
all-commits at lists.llvm.org
Tue Jun 17 07:30:30 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8f797542258f6e682eb251d0851922a1ac08fb44
https://github.com/llvm/llvm-project/commit/8f797542258f6e682eb251d0851922a1ac08fb44
Author: Florian Hahn <flo at fhahn.com>
Date: 2025-06-17 (Tue, 17 Jun 2025)
Changed paths:
M llvm/lib/Analysis/ScalarEvolution.cpp
M llvm/test/Transforms/IndVarSimplify/simplify-icmp-operands-order.ll
Log Message:
-----------
[SCEV] Better preserve wrapping info in SimplifyICmpOperands for UGE. (#144404)
Update SimplifyICmpOperands to only try subtracting 1 from RHS first, if
RHS is an op we can fold the subtract directly into. Otherwise try
adding to LHS first, as we can preserve NUW flags.
This improves results in a few cases, including the modified test case
from berkeley-abc and new code to be added in
https://github.com/llvm/llvm-project/pull/128061.
Note that there are more cases where the results can be improved by
better ordering here which I'll try to investigate as follow-up.
PR: https://github.com/llvm/llvm-project/pull/144404
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list