As suggested by Richard Biener in the comments of PR middle-end/102029,
the new test "INTEGRAL_TYPE_P (type) && !POINTER_TYPE_P (type) ..." is
redundant, and just "INTEGRAL_TYPE_P (type)" is the preferred form.

Committed as obvious/pre-approved, after a "make bootstrap" and
"make -k check" with no new failures on x86_64-pc-linux-gnu.


2021-08-26  Roger Sayle  <ro...@nextmovesoftware.com>
            Richard Biener  <rguent...@suse.de>

gcc/ChangeLog
        * match.pd (shift transformations): Remove a redundant
        !POINTER_TYPE_P check.

Roger
--

diff --git a/gcc/match.pd b/gcc/match.pd
index e5bbb12..f421c74 100644
--- a/gcc/match.pd
+++ b/gcc/match.pd
@@ -3390,7 +3390,6 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
 (simplify
  (convert (lshift:s@0 (convert:s@1 @2) INTEGER_CST@3))
  (if (INTEGRAL_TYPE_P (type)
-      && !POINTER_TYPE_P (type)
       && tree_nop_conversion_p (type, TREE_TYPE (@0))
       && INTEGRAL_TYPE_P (TREE_TYPE (@2))
       && TYPE_PRECISION (TREE_TYPE (@2)) <= TYPE_PRECISION (type))

Reply via email to