public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-3163] [Committed] Tidy up !POINTER_TYPE_P test in match.pd LSHIFT_EXPR folding
@ 2021-08-26 17:52 Roger Sayle
  0 siblings, 0 replies; only message in thread
From: Roger Sayle @ 2021-08-26 17:52 UTC (permalink / raw)
  To: gcc-cvs

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

commit r12-3163-ga2d9b558299df91e9c34a583eb0f0b14d1cacce9
Author: Roger Sayle <roger@nextmovesoftware.com>
Date:   Thu Aug 26 18:51:46 2021 +0100

    [Committed] Tidy up !POINTER_TYPE_P test in match.pd LSHIFT_EXPR folding
    
    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.

Diff:
---
 gcc/match.pd | 1 -
 1 file changed, 1 deletion(-)

diff --git a/gcc/match.pd b/gcc/match.pd
index e5bbb123a6a..f421c74b62c 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))


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

only message in thread, other threads:[~2021-08-26 17:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-26 17:52 [gcc r12-3163] [Committed] Tidy up !POINTER_TYPE_P test in match.pd LSHIFT_EXPR folding Roger Sayle

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