[COMMITTED 5/7] Add relation effects between operands to MINUS_EXPR.

Andrew MacLeod amacleod@redhat.com
Tue Jun 22 13:18:48 GMT 2021


This patch enhances processing of OP_MINUS to show how we can utilize 
relations between op1 and op2 to produce a better result. Given:

a_3 = b_4 - d_1

if we know b_4 > d_1, on top of whatever other range calculations we can 
do with the actual ranges, we can apply the knowledge that the result 
must also  be  in the range [1, +INF] as well.

likewise, if we know b_4 == d_1, we know the result is [0,0]

This provide a sample of how applying a relation between 2 operands is 
implemented.

Bootstraps on x86_64-pc-linux-gnu with no regressions.  Pushed.

Andrew

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-Add-relation-effects-between-operands-to-MINUS_EXPR.patch
Type: text/x-patch
Size: 2249 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210622/f70af7f9/attachment.bin>


More information about the Gcc-patches mailing list