diff mbox

[i386] Cannot inline sse*.* functions into avx functions

Message ID CAFULd4aTg0m9JqQ00=PRkcv2O3aNMZh4SRUdJdp-OfiYWUZtow@mail.gmail.com
State New
Headers show

Commit Message

Uros Bizjak July 1, 2013, 9:12 p.m. UTC
On Mon, Jul 1, 2013 at 8:01 PM, Sriraman Tallam <tmsriram@google.com> wrote:

>    So, something like the patch attached?
>
>         * config/i386/i386.c (ix86_option_override_internal): Turn
>         on all -mavx target flags by default as they are dependent
>         on AVX anyway.

Yes, but please also add:


so we won't trigger vzeroupper insertion pass for non-AVX targets.

Uros.

Comments

Sriraman Tallam July 3, 2013, 12:03 a.m. UTC | #1
On Mon, Jul 1, 2013 at 2:12 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Mon, Jul 1, 2013 at 8:01 PM, Sriraman Tallam <tmsriram@google.com> wrote:
>
>>    So, something like the patch attached?
>>
>>         * config/i386/i386.c (ix86_option_override_internal): Turn
>>         on all -mavx target flags by default as they are dependent
>>         on AVX anyway.
>
> Yes, but please also add:
>
> Index: i386.c
> ===================================================================
> --- i386.c      (revision 200579)
> +++ i386.c      (working copy)
> @@ -2578,7 +2578,7 @@ static const char *const cpu_names[TARGET_CPU_DEFA
>  static bool
>  gate_insert_vzeroupper (void)
>  {
> -  return TARGET_VZEROUPPER;
> +  return TARGET_AVX && TARGET_VZEROUPPER;
>  }
>
>  static unsigned int
>
> so we won't trigger vzeroupper insertion pass for non-AVX targets.

Made that change, added the test case and committed.

Thanks
Sri


>
> Uros.
diff mbox

Patch

Index: i386.c
===================================================================
--- i386.c      (revision 200579)
+++ i386.c      (working copy)
@@ -2578,7 +2578,7 @@  static const char *const cpu_names[TARGET_CPU_DEFA
 static bool
 gate_insert_vzeroupper (void)
 {
-  return TARGET_VZEROUPPER;
+  return TARGET_AVX && TARGET_VZEROUPPER;
 }

 static unsigned int