[COMMITTED] PR tree-optimization/103079 - Treat undefined operands as varying in GORI.
Thu Nov 4 17:27:25 GMT 2021
Outgoing range calculations were assuming an undefined operand produces
an undefined result. This is not true, as in the testcxase:
[0, 0] = UNDEFINED | b_9 tells us that b_9 is [0,0] and the rest
of the time, we only know its varying. Returning UNDEFINED for b_9 is
This patch turns any UNDEFINED values for op1 and op2 into VARYING, and
then invokes the calcualtion, so instead, we';ll know see:
[0, 0] = VARYING | b_9 which the solvers will correctly pick the
Furthermore, we were always returning UNDEFINED when the LHS is
UNDEFINED = 1 | b_9 was returning UNDEFINED for b_9... even tho the
LHS is undefined, it seems to be asking for trouble to continue
calculating an outgoing range for b_9, so instead we just stop looking now.
Bootstrapped on x86_64-pc-linux-gnu with no regressions. Pushed.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3787 bytes
Desc: not available
More information about the Gcc-patches