]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Committed] Tidy up !POINTER_TYPE_P test in match.pd LSHIFT_EXPR folding
authorRoger Sayle <roger@nextmovesoftware.com>
Thu, 26 Aug 2021 17:51:46 +0000 (18:51 +0100)
committerRoger Sayle <roger@nextmovesoftware.com>
Thu, 26 Aug 2021 17:51:46 +0000 (18:51 +0100)
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.

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

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

gcc/match.pd

index e5bbb123a6ad84a0357b2d0120d1c7641019a3a6..f421c74b62c77e2708448bc7951faf84a9fbe093 100644 (file)
@@ -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))