From: Richard Earnshaw Date: Wed, 15 Jun 2022 12:42:23 +0000 (+0100) Subject: arm: fix thinko in arm_bfi_1_p() [PR105974] X-Git-Tag: basepoints/gcc-14~6099 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc8071da0e89eab4935751f3b16745c95cbc0d30;p=thirdparty%2Fgcc.git arm: fix thinko in arm_bfi_1_p() [PR105974] I clearly wasn't thinking straight when I wrote the arm_bfi_1_p function and used XUINT rather than UINTVAL when extracting CONST_INT values. It seemed to work in testing, but was incorrect and failed RTL checking. Fixed thusly: gcc/ChangeLog: PR target/105974 * config/arm/arm.cc (arm_bfi_1_p): Use UINTVAL instead of XUINT. --- diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc index 2a76c7b9a72..5aa48fc7664 100644 --- a/gcc/config/arm/arm.cc +++ b/gcc/config/arm/arm.cc @@ -10211,15 +10211,15 @@ arm_bfi_1_p (rtx op0, rtx op1, rtx *sub0, rtx *sub1) if (!CONST_INT_P (XEXP (op0, 1))) return false; - const1 = XUINT (XEXP (op0, 1), 0); + const1 = UINTVAL (XEXP (op0, 1)); if (!CONST_INT_P (XEXP (op1, 1)) - || ~XUINT (XEXP (op1, 1), 0) != const1) + || ~UINTVAL (XEXP (op1, 1)) != const1) return false; if (GET_CODE (XEXP (op0, 0)) == ASHIFT && CONST_INT_P (XEXP (XEXP (op0, 0), 1))) { - const2 = XUINT (XEXP (XEXP (op0, 0), 1), 0); + const2 = UINTVAL (XEXP (XEXP (op0, 0), 1)); *sub0 = XEXP (XEXP (op0, 0), 0); } else