https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96366

--- Comment #5 from Bu Le <bule1 at huawei dot com> ---
(In reply to rsand...@gcc.gnu.org from comment #3)
> (In reply to Bu Le from comment #2)
> > (In reply to rsand...@gcc.gnu.org from comment #1)
> > > (In reply to Bu Le from comment #0)

> Generating a subtraction out of an addition seemed odd since
> canonicalisations usually go the other way.  But if the target
> says it supports negation too then that changes things.  It doesn't
> make much sense to support addition and negation but not subtraction.

If some mode or target do not have a subtraction pattern, should we let the
compiler try to use the addition and negation before it fall into an ICE? If
so, the changes for optabs seems reasonable as well.


(In reply to rsand...@gcc.gnu.org from comment #4)
> Fixed by g:9623f61b142174b87760c81f78928dd14af7cbc6.
> 
> As far as I know, only GCC 11 needs the fix, but we can backport
> to GCC 10 as well if we find a testcase that needs it.

Sure, I will have a try to see whether the problem also exists in gcc10.

Reply via email to