public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-2659] Fix PR 101683: FP exceptions for float->unsigned
@ 2021-08-02 14:47 Andrew Pinski
0 siblings, 0 replies; only message in thread
From: Andrew Pinski @ 2021-08-02 14:47 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:99b520f031c0e491d7e170916df11dd645d60617
commit r12-2659-g99b520f031c0e491d7e170916df11dd645d60617
Author: Andrew Pinski <apinski@marvell.com>
Date: Thu Jul 29 19:48:46 2021 -0700
Fix PR 101683: FP exceptions for float->unsigned
Just like the old bug PR9651, unsigned_fix rtl should
also be handled as a trapping instruction.
OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.
gcc/ChangeLog:
PR rtl-optimization/101683
* rtlanal.c (may_trap_p_1): Handle UNSIGNED_FIX.
Diff:
---
gcc/rtlanal.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index 3b8d88afd4d..f7f3acb75db 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -3261,6 +3261,7 @@ may_trap_p_1 (const_rtx x, unsigned flags)
break;
case FIX:
+ case UNSIGNED_FIX:
/* Conversion of floating point might trap. */
if (flag_trapping_math && HONOR_NANS (XEXP (x, 0)))
return 1;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-02 14:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-02 14:47 [gcc r12-2659] Fix PR 101683: FP exceptions for float->unsigned Andrew Pinski
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).