middle-end: Prefer TRULY_NOOP_TRUNCATION_MODES_P over raw target hook.
authorRoger Sayle <roger@nextmovesoftware.com>
Fri, 17 Jul 2020 13:06:45 +0000 (14:06 +0100)
committerRoger Sayle <roger@nextmovesoftware.com>
Fri, 17 Jul 2020 13:06:45 +0000 (14:06 +0100)
2020-07-16  Roger Sayle  <roger@nextmovesoftware.com>

gcc/ChangeLog
* function.c (assign_parm_setup_block): Use the macro
TRULY_NOOP_TRUNCATION_MODES_P instead of calling
targetm.truly_noop_truncation directly.

gcc/function.c

index 9eee9b59bfdd7e898da353c5d8a2ae76ce4da034..cdfcc4b6b86810f9a3d677f827ae6c8b98b9191e 100644 (file)
@@ -3013,8 +3013,8 @@ assign_parm_setup_block (struct assign_parm_data_all *all,
                 to the value directly in mode MODE, otherwise we must
                 start with the register in word_mode and explicitly
                 convert it.  */
-             if (targetm.truly_noop_truncation (size * BITS_PER_UNIT,
-                                                BITS_PER_WORD))
+             if (mode == word_mode
+                 || TRULY_NOOP_TRUNCATION_MODES_P (mode, word_mode))
                reg = gen_rtx_REG (mode, REGNO (entry_parm));
              else
                {