Treat undefined operands as varying in GORI.
authorAndrew MacLeod <amacleod@redhat.com>
Thu, 4 Nov 2021 15:07:28 +0000 (11:07 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Thu, 4 Nov 2021 17:15:36 +0000 (13:15 -0400)
commit004afb984beb6efbe25f44a5857b1c27ebc2ec82
tree6f9c5a694d125164cad695d5ef02fcd44d551fdb
parent1ece90ffa9ce63b416296bd662b8117d9b538913
Treat undefined operands as varying in GORI.

If the LHS is UNDEFINED simply stop calculating.  Treat op1 and op2
as VARYING if they are UNDEFINED.

PR tree-optimization/103079
gcc/
* gimple-range-gori.cc (gimple_range_calc_op1): Treat undefined as
varying.
(gimple_range_calc_op2): Ditto.

gcc/testsuite/
* gcc.dg/pr103079.c: New.
gcc/gimple-range-gori.cc
gcc/testsuite/gcc.dg/pr103079.c [new file with mode: 0644]