public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][internal-fn.c][committed] Convert conditional compilation on WORD_REGISTER_OPERATIONS
@ 2016-04-28 13:37 Kyrill Tkachov
  0 siblings, 0 replies; only message in thread
From: Kyrill Tkachov @ 2016-04-28 13:37 UTC (permalink / raw)
  To: GCC Patches

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

Hi all,

This is another instance of conditional compilation on WORD_REGISTER_OPERATIONS that's trivial to remove.

Bootstrapped and tested on arm, aarch64, x86_64.
Committing to trunk as obvious.

Thanks,
Kyrill

2016-04-28  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

     * internal-fn.c (expand_arith_overflow): Convert preprocessor check
     for WORD_REGISTER_OPERATIONS to runtime check.

[-- Attachment #2: word-regs-internal-fn.patch --]
[-- Type: text/x-patch, Size: 731 bytes --]

diff --git a/gcc/internal-fn.c b/gcc/internal-fn.c
index 3ceaffe67eaa694afe35de8f7a13a182c46f05ff..2cbe198924c7b3aed34d52c0cc35612e09f5646c 100644
--- a/gcc/internal-fn.c
+++ b/gcc/internal-fn.c
@@ -1807,11 +1807,7 @@ expand_arith_overflow (enum tree_code code, gimple *stmt)
       /* For sub-word operations, retry with a wider type first.  */
       if (orig_precres == precres && precop <= BITS_PER_WORD)
 	{
-#if WORD_REGISTER_OPERATIONS
-	  int p = BITS_PER_WORD;
-#else
-	  int p = precop;
-#endif
+	  int p = WORD_REGISTER_OPERATIONS ? BITS_PER_WORD : precop;
 	  enum machine_mode m = smallest_mode_for_size (p, MODE_INT);
 	  tree optype = build_nonstandard_integer_type (GET_MODE_PRECISION (m),
 							uns0_p && uns1_p

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

only message in thread, other threads:[~2016-04-28 13:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-28 13:37 [PATCH][internal-fn.c][committed] Convert conditional compilation on WORD_REGISTER_OPERATIONS Kyrill Tkachov

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