From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by sourceware.org (Postfix) with ESMTPS id 72BAD3858031 for ; Fri, 30 Jul 2021 19:22:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 72BAD3858031 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 16UJLVrd002454 for ; Fri, 30 Jul 2021 12:22:13 -0700 Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com with ESMTP id 3a456tuhaa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Fri, 30 Jul 2021 12:22:12 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 30 Jul 2021 12:22:10 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Fri, 30 Jul 2021 12:22:10 -0700 Received: from linux.wrightpinski.org.com (unknown [10.69.242.197]) by maili.marvell.com (Postfix) with ESMTP id E31DA3F705F; Fri, 30 Jul 2021 12:22:06 -0700 (PDT) From: To: CC: Andrew Pinski Subject: [PATCH] Fix PR 101683: FP exceptions for float->unsigned Date: Fri, 30 Jul 2021 12:21:05 -0700 Message-ID: <1627672865-8822-1-git-send-email-apinski@marvell.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-GUID: XLp7b-Lm_YVfSL_MeDLZtId1GQDy-8gv X-Proofpoint-ORIG-GUID: XLp7b-Lm_YVfSL_MeDLZtId1GQDy-8gv X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-07-30_11:2021-07-30, 2021-07-30 signatures=0 X-Spam-Status: No, score=-14.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2021 19:22:16 -0000 From: Andrew Pinski 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. --- 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; -- 2.27.0