[Bug target/86891] [9 Regression] wrong code with -O -frerun-cse-after-loop -fno-tree-dominator-opts -fno-tree-fre
wilco at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Dec 20 20:19:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86891
Wilco <wilco at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2018-12-20
CC| |wilco at gcc dot gnu.org
Assignee|unassigned at gcc dot gnu.org |wilco at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #3 from Wilco <wilco at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #1)
> Now, looking at what aarch64 does for add with carry, there are separate
> patterns like add<mode>3_carryinC which set CC_C mode and use zero_extend
> and add<mode>3_carryinV which sets CC_V mode and uses sign_extend.
> So, shouldn't sub<mode>3_carryin{C,V} be split similarly and if we check
> carry flag, we should use subdi3_carryinC?
Yes it looks like the pattern confuses signed and unsigned underflow. Changing
it to zero_extend and using minus for the compare fixes the reported issue, but
it's not possible to support signed and unsigned in a single pattern.
More information about the Gcc-bugs
mailing list