This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/60431] [PATCH] [TIC6X] target description missing abssi2 insn
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 05 Mar 2014 18:25:54 +0000
- Subject: [Bug target/60431] [PATCH] [TIC6X] target description missing abssi2 insn
- Auto-submitted: auto-generated
- References: <bug-60431-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60431
--- Comment #3 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
The semantics of the abssi2 insn pattern on the most negative integer are
that it returns the argument unchanged (RTL operations are generally
modulo; the semantics don't depend on whether -fwrapv is used). Thus, a
saturating abs instruction is unsuitable for implementing that pattern;
you need to make the machine-independent compiler able to use ssabssi2 to
expand ABS_EXPR-with-undefined-overflow (i.e. ABS_EXPR without flag_wrapv
or flag_trapv), when the saturating pattern is present but not the
non-saturating pattern.