summaryrefslogtreecommitdiff
path: root/gcc/builtins.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r--gcc/builtins.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 28be3422f58..d1eeda9f5f2 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -836,6 +836,22 @@ apply_args_size ()
&& have_insn_for (SET, mode))
best_mode = mode;
+ if (best_mode == VOIDmode)
+ for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_FLOAT);
+ mode != VOIDmode;
+ mode = GET_MODE_WIDER_MODE (mode))
+ if (HARD_REGNO_MODE_OK (regno, mode)
+ && have_insn_for (SET, mode))
+ best_mode = mode;
+
+ if (best_mode == VOIDmode)
+ for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_INT);
+ mode != VOIDmode;
+ mode = GET_MODE_WIDER_MODE (mode))
+ if (HARD_REGNO_MODE_OK (regno, mode)
+ && have_insn_for (SET, mode))
+ best_mode = mode;
+
mode = best_mode;
if (mode == VOIDmode)
abort ();
@@ -892,6 +908,22 @@ apply_result_size ()
&& have_insn_for (SET, mode))
best_mode = mode;
+ if (best_mode == VOIDmode)
+ for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_FLOAT);
+ mode != VOIDmode;
+ mode = GET_MODE_WIDER_MODE (mode))
+ if (HARD_REGNO_MODE_OK (regno, mode)
+ && have_insn_for (SET, mode))
+ best_mode = mode;
+
+ if (best_mode == VOIDmode)
+ for (mode = GET_CLASS_NARROWEST_MODE (MODE_VECTOR_INT);
+ mode != VOIDmode;
+ mode = GET_MODE_WIDER_MODE (mode))
+ if (HARD_REGNO_MODE_OK (regno, mode)
+ && have_insn_for (SET, mode))
+ best_mode = mode;
+
mode = best_mode;
if (mode == VOIDmode)
abort ();