Hi, sending a v4 of https://gcc.gnu.org/pipermail/gcc-patches/2024-September/663592.html with the following changes since v3:
- Cleaned up the testcases in patches #1, #2, #4 by removing trivially dead initializers. - Added a !TYPE_UNSIGNED () check in patch #3 for clarity. - Removed the use of build_uniform_cst () in patch #4. The series has been reviewed and pre-approved by Richard contingent on the changes above, so assuming it looks good, could anyone please push it to trunk/14 on my behalf? Many thanks, Artemiy Artemiy Volkov (4): tree-optimization/116024 - simplify C1-X cmp C2 for UB-on-overflow types tree-optimization/116024 - simplify C1-X cmp C2 for unsigned types tree-optimization/116024 - simplify C1-X cmp C2 for wrapping signed types tree-optimization/116024 - simplify some cases of X +- C1 cmp C2 gcc/match.pd | 109 +++++++++++++++++- gcc/testsuite/gcc.dg/pr67089-6.c | 4 +- .../gcc.dg/tree-ssa/pr116024-1-fwrapv.c | 65 +++++++++++ gcc/testsuite/gcc.dg/tree-ssa/pr116024-1.c | 65 +++++++++++ .../gcc.dg/tree-ssa/pr116024-2-fwrapv.c | 38 ++++++ gcc/testsuite/gcc.dg/tree-ssa/pr116024-2.c | 37 ++++++ gcc/testsuite/gcc.dg/tree-ssa/pr116024.c | 66 +++++++++++ .../gcc.target/aarch64/gtu_to_ltu_cmp_1.c | 2 +- 8 files changed, 382 insertions(+), 4 deletions(-) create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr116024-1-fwrapv.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr116024-1.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr116024-2-fwrapv.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr116024-2.c create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr116024.c -- 2.44.2