]> git.ipfire.org Git - thirdparty/gcc.git/commit
If the LHS does not contain zero, neither do multiply operands.
authorAndrew MacLeod <amacleod@redhat.com>
Wed, 26 Mar 2025 14:34:42 +0000 (10:34 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Fri, 28 Mar 2025 14:25:30 +0000 (10:25 -0400)
commitdd9ed951f4002419ceff744bbd87ae9b8affdaf4
tree7b30ffedee0f05f8c3ab7d3edb8e8bbeea78f159
parentdcb7009efc5358207d1b0612732a0608915a3ef7
If the LHS does not contain zero, neither do multiply operands.

Given ~[0,0] = op1 * op2, range-ops should determine that neither op1 nor
op2 is zero.  Add this to the operator_mult for op1_range.  op2_range
simply invokes op1_range, so both will be covered.

PR tree-optimzation/110992.c
PR tree-optimzation/119471.c
gcc/
* range-op.cc (operator_mult::op1_range): If the LHS does not
contain zero, return non-zero.

gcc/testsuite/
* gcc.dg/pr110992.c: New.
* gcc.dg/pr119471.c: New.
gcc/range-op.cc
gcc/testsuite/gcc.dg/pr110992.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr119471.c [new file with mode: 0644]