[committed] arm: fix thinko in arm_bfi_1_p() [PR105974]
Commit Message
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.
---
gcc/config/arm/arm.cc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
@@ -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