[clang] [PowerPC] Diagnose invalid combination with Altivec, VSX and soft-float (PR #79109)

Amy Kwan via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 24 12:36:43 PST 2024


================
@@ -1,4 +1,7 @@
 // RUN: not %clang_cc1 -triple powerpc64le-linux-gnu -emit-llvm %s -o -
 
 long __attribute__((target("power8-vector,no-vsx"))) foo (void) { return 0; }  // expected-error {{option '-mpower8-vector' cannot be specified with '-mno-vsx'}}
+long __attribute__((target("no-altivec,vsx"))) foo2(void) { return 0; }        // expected-error {{option '-mvsx' cannot be specified with '-mno-altivec'}}
+long __attribute__((target("no-hard-float,altivec"))) foo3(void) { return 0; } // expected-error {{option '-msoft-float' cannot be specified with '-maltivec'}}
+long __attribute__((target("no-hard-float,vsx"))) foo3(void) { return 0; } // expected-error {{option '-msoft-float' cannot be specified with '-mvsx'}}
----------------
amy-kwan wrote:

nit: Rename as `foo4`?

https://github.com/llvm/llvm-project/pull/79109


More information about the cfe-commits mailing list