You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[PowerPC] Diagnose invalid combination with Altivec, VSX and soft-float (#79109)
Moved from https://reviews.llvm.org/D126302
The current behaviour with these three options is quite undesirable:
-mno-altivec -mvsx allows VSX to override no Altivec, thereby turning on
both
-msoft-float -maltivec causes a crash if an actual Altivec instruction
is required because soft float turns of Altivec
-msoft-float -mvsx is also accepted with both Altivec and VSX turned off
(potentially causing crashes as above)
This patch diagnoses these impossible combinations in the driver so the
user does not end up with surprises in terms of their options being
ignored or silently overridden.
Fixes#55556
---------
Co-authored-by: Nemanja Ivanovic <[email protected]>
// RUN: not %clang_cc1 -triple powerpc64le-linux-gnu -emit-llvm %s -o -
2
2
3
3
long __attribute__((target("power8-vector,no-vsx"))) foo (void) { return0; } // expected-error {{option '-mpower8-vector' cannot be specified with '-mno-vsx'}}
4
+
long __attribute__((target("no-altivec,vsx"))) foo2(void) { return0; } // expected-error {{option '-mvsx' cannot be specified with '-mno-altivec'}}
5
+
long __attribute__((target("no-hard-float,altivec"))) foo3(void) { return0; } // expected-error {{option '-msoft-float' cannot be specified with '-maltivec'}}
6
+
long __attribute__((target("no-hard-float,vsx"))) foo4(void) { return0; } // expected-error {{option '-msoft-float' cannot be specified with '-mvsx'}}
0 commit comments