]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
s390x: Do not default to -mvx for -mesa
authorAndreas Krebbel <krebbel@linux.ibm.com>
Mon, 22 Apr 2024 09:07:43 +0000 (11:07 +0200)
committerAndreas Krebbel <krebbel@linux.ibm.com>
Mon, 22 Apr 2024 09:08:23 +0000 (11:08 +0200)
We currently enable the vector extensions also for -march=z13 -m31
-mesa which is very wrong.

gcc/ChangeLog:

* config/s390/s390.cc (s390_option_override_internal): Check zarch
flag before enabling -mvx.

gcc/config/s390/s390.cc

index bf46eab2d633eb16b8b79051b7b1b3feffbd235a..5968808fcb6e2267674fac8afa5ce712daedd2e5 100644 (file)
@@ -16104,7 +16104,7 @@ s390_option_override_internal (struct gcc_options *opts,
     }
   else
     {
-      if (TARGET_CPU_VX_P (opts))
+      if (TARGET_CPU_VX_P (opts) && TARGET_ZARCH_P (opts->x_target_flags))
        /* Enable vector support if available and not explicitly disabled
           by user.  E.g. with -m31 -march=z13 -mzarch */
        opts->x_target_flags |= MASK_OPT_VX;