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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |nickc at gcc dot gnu.org,
                   |                            |ramana at gcc dot gnu.org,
                   |                            |rearnsha at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The addv<mode>3, subv<mode>3, mulv<mode>3 and negv<mode>2 named patterns when
defined should trap if overflow happened.
>From these, arm implements subvsi3 since r10-3995 , but to me it looks just
that it was
added as part of improving subv{si,di}4, which is a pair of different named
patterns.
The {add,sub,mul}v<mode>3 and negv<mode>2 are used for -ftrapv,
{add,sub,mul}v<mode>4
are used for -fsanitize=undefined etc.

So, I think simplest fix would be just to rename subvsi3 define_insn and the
corresponding gen_subvsi3 call to something else.  Even better also for
subvsi3_intmin and subvsi3_imm1 and subvsi3_borrow and subvsi3_borrow_imm to
something that doesn't include the misleading subvsi3 prefix.
Unless ARM has also conditional trap instruction that can trap if CC_V
CC_REGNUM, in that case just the first one should be renamed and define_expand
added which would behave similarly to subv<mode>4 except instead of
conditionally jumping to the last operand it would conditionally trap.

Reply via email to