public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/94935] New: Failure to emit call to absvsi2 for __builtin_abs with -ftrapv
@ 2020-05-03 11:20 gabravier at gmail dot com
2020-05-04 6:51 ` [Bug middle-end/94935] " rguenth at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: gabravier at gmail dot com @ 2020-05-03 11:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94935
Bug ID: 94935
Summary: Failure to emit call to absvsi2 for __builtin_abs with
-ftrapv
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: gabravier at gmail dot com
Target Milestone: ---
unsigned f(int x)
{
return __builtin_abs(x);
}
This should emit a call to __absvsi2, not get "inlined" into a call to
__subvsi3
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug middle-end/94935] Failure to emit call to absvsi2 for __builtin_abs with -ftrapv
2020-05-03 11:20 [Bug middle-end/94935] New: Failure to emit call to absvsi2 for __builtin_abs with -ftrapv gabravier at gmail dot com
@ 2020-05-04 6:51 ` rguenth at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-05-04 6:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94935
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |x86_64-*-*
Last reconfirmed| |2020-05-04
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Keywords| |wrong-code
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed. We're expanding via
rtx
expand_abs_nojump (machine_mode mode, rtx op0, rtx target,
int result_unsignedp)
{
...
/* If this machine has expensive jumps, we can do integer absolute
value of X as (((signed) x >> (W-1)) ^ x) - ((signed) x >> (W-1)),
where W is the width of MODE. */
since the machine has no absvsi2 pattern. It smells like a correctness
issue (though you don't explicitely say so?)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-04 6:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-03 11:20 [Bug middle-end/94935] New: Failure to emit call to absvsi2 for __builtin_abs with -ftrapv gabravier at gmail dot com
2020-05-04 6:51 ` [Bug middle-end/94935] " rguenth at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).