[PATCH 2/3] Add simplify rules for wrapped binary operations.
Robin Dapp
rdapp@linux.ibm.com
Tue Aug 20 09:19:00 GMT 2019
> So - which case is it? IIRC we want to handle small signed
> constants but the code can end up unsigned. For the
> above we could write (unsigned long)((int)a + 1 - 1) and thus
> sign-extend? Or even avoid this if we know the range.
> That is, it becomes the first case again (operation performed
> in a smaller type).
Both :) But in order to move forward the second transform suffices to
get rid of the redundant subtraction/addition of the ivopts candidate.
Attached is a new version as single file that disregards the other
possible cases (3/3 from before), only performs this transform and
checks for gimple_simplified in vrp2 after ivopts now.
Bootstrapped, no regressions on s390 and x86.
Regards
Robin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wrapped-binop-onepatch.diff
Type: text/x-patch
Size: 9982 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190820/b4da45dc/attachment.bin>
More information about the Gcc-patches
mailing list