public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-1108] arm: fix thinko in arm_bfi_1_p() [PR105974]
@ 2022-06-15 12:43 Richard Earnshaw
  0 siblings, 0 replies; only message in thread
From: Richard Earnshaw @ 2022-06-15 12:43 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:dc8071da0e89eab4935751f3b16745c95cbc0d30

commit r13-1108-gdc8071da0e89eab4935751f3b16745c95cbc0d30
Author: Richard Earnshaw <rearnsha@arm.com>
Date:   Wed Jun 15 13:42:23 2022 +0100

    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:
---
 gcc/config/arm/arm.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-15 12:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-15 12:43 [gcc r13-1108] arm: fix thinko in arm_bfi_1_p() [PR105974] Richard Earnshaw

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).