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

[-- Attachment #1: Type: text/plain, Size: 541 bytes --]


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  <roger@nextmovesoftware.com>
	    Richard Biener  <rguenther@suse.de>

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

Roger
--


[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 476 bytes --]

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

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

only message in thread, other threads:[~2021-08-26 17:54 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:54 [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).