[AIX][PowerPC] Remove error when specifying mabi=vec-default on AIX

The default Altivec ABI was implemented but the clang error for specifying
its use still remains.  Users could get around this but not specifying the
type of Altivec ABI but we need to remove the error.

Reviewed By: jsji

Differential Revision: https://reviews.llvm.org/D102094
This commit is contained in:
Zarko Todorovski 2021-06-23 07:14:24 -04:00
parent ff4b1d379f
commit 76c931ae42
7 changed files with 28 additions and 33 deletions

View File

@ -542,9 +542,6 @@ def err_drv_cannot_mix_options : Error<"cannot specify '%1' along with '%0'">;
def err_drv_invalid_object_mode : Error<"OBJECT_MODE setting %0 is not recognized and is not a valid setting.">;
def err_aix_default_altivec_abi : Error<
"The default Altivec ABI on AIX is not yet supported, use '-mabi=vec-extabi' for the extended Altivec ABI">;
def err_aix_unsupported_tls_model : Error<"TLS model '%0' is not yet supported on AIX">;
def err_invalid_cxx_abi : Error<"Invalid C++ ABI name '%0'">;

View File

@ -4823,7 +4823,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
if (A->getOption().getID() == options::OPT_mabi_EQ_vec_extabi)
CmdArgs.push_back("-mabi=vec-extabi");
else
D.Diag(diag::err_aix_default_altivec_abi);
CmdArgs.push_back("-mabi=vec-default");
}
if (Arg *A = Args.getLastArg(options::OPT_Wframe_larger_than_EQ)) {

View File

@ -1859,13 +1859,7 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args,
<< A->getSpelling() << T.str();
const Option &O = A->getOption();
if (O.matches(OPT_mabi_EQ_vec_default))
Diags.Report(diag::err_aix_default_altivec_abi)
<< A->getSpelling() << T.str();
else {
assert(O.matches(OPT_mabi_EQ_vec_extabi));
Opts.EnableAIXExtendedAltivecABI = 1;
}
Opts.EnableAIXExtendedAltivecABI = O.matches(OPT_mabi_EQ_vec_extabi);
}
bool NeedLocTracking = false;

View File

@ -4,12 +4,12 @@
// RUN: %clang_cc1 -target-feature +altivec -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-LE
// RUN: %clang_cc1 -target-feature +altivec -mabi=vec-extabi -target-cpu pwr8 -triple powerpc-unknown-aix -emit-llvm %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-BE
// RUN: %clang_cc1 -target-feature +altivec -mabi=vec-extabi -target-cpu pwr8 -triple powerpc64-unknown-aix -emit-llvm %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-BE
// RUN: not %clang_cc1 -target-feature +altivec -mabi=vec-default -target-cpu pwr8 -triple powerpc-unknown-aix -emit-llvm %s 2>&1 | FileCheck %s --check-prefix=AIX-ERROR
// RUN: not %clang_cc1 -target-feature +altivec -mabi=vec-default -target-cpu pwr8 -triple powerpc64-unknown-aix -emit-llvm %s 2>&1 | FileCheck %s --check-prefix=AIX-ERROR
// RUN: %clang -S -emit-llvm -maltivec -mabi=vec-extabi -mcpu=pwr8 -target powerpc-unknown-aix %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-BE
// RUN: %clang -S -emit-llvm -maltivec -mabi=vec-extabi -mcpu=pwr8 -target powerpc64-unknown-aix %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-BE
// RUN: not %clang -S -emit-llvm -maltivec -mabi=vec-default -mcpu=pwr8 -triple powerpc-unknown-aix -emit-llvm %s 2>&1 | FileCheck %s --check-prefix=AIX-ERROR
// RUN: not %clang -S -emit-llvm -maltivec -mabi=vec-default -mcpu=pwr8 -triple powerpc64-unknown-aix -emit-llvm %s 2>&1 | FileCheck %s --check-prefix=AIX-ERROR
// RUN: %clang_cc1 -target-feature +altivec -mabi=vec-default -target-cpu pwr8 -triple powerpc-unknown-aix -emit-llvm %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-BE
// RUN: %clang_cc1 -target-feature +altivec -mabi=vec-default -target-cpu pwr8 -triple powerpc64-unknown-aix -emit-llvm %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-BE
// RUN: %clang -S -emit-llvm -maltivec -mabi=vec-extabi -mcpu=pwr8 --target=powerpc-unknown-aix %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-BE
// RUN: %clang -S -emit-llvm -maltivec -mabi=vec-extabi -mcpu=pwr8 --target=powerpc64-unknown-aix %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-BE
// RUN: %clang -S -emit-llvm -maltivec -mabi=vec-default -mcpu=pwr8 --target=powerpc-unknown-aix -emit-llvm %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-BE
// RUN: %clang -S -emit-llvm -maltivec -mabi=vec-default -mcpu=pwr8 --target=powerpc64-unknown-aix -emit-llvm %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-BE
// Check initialization
vector int test0 = (vector int)(1); // CHECK: @test0 ={{.*}} global <4 x i32> <i32 1, i32 1, i32 1, i32 1>
@ -52,5 +52,3 @@ void test3() {
vector float vf;
vf++; // CHECK: fadd <4 x float> {{.*}} <float 1.000000e+{{0+}}, float 1.000000e+{{0+}}, float 1.000000e+{{0+}}, float 1.000000e+{{0+}}>
}
// AIX-ERROR: error: The default Altivec ABI on AIX is not yet supported, use '-mabi=vec-extabi' for the extended Altivec ABI

View File

@ -1,10 +0,0 @@
// RUN: %clang -### -target powerpc-unknown-aix -S -maltivec -mabi=vec-extabi %s 2>&1 | \
// RUN: FileCheck %s
// CHECK: "-cc1"
// CHECK-SAME: "-mabi=vec-extabi"
// RUN: %clang -### -target powerpc-unknown-aix -S -maltivec -mabi=vec-default %s 2>&1 | \
// RUN: FileCheck %s --check-prefix=ERROR
// ERROR: The default Altivec ABI on AIX is not yet supported, use '-mabi=vec-extabi' for the extended Altivec ABI

View File

@ -0,0 +1,16 @@
// RUN: %clang -### -target powerpc-unknown-aix -S %s 2>&1 | \
// RUN: FileCheck %s --implicit-check-not=vec-extabi
// RUN: %clang -### -target powerpc-unknown-aix -S -maltivec %s 2>&1 | \
// RUN: FileCheck %s --implicit-check-not=vec-extabi
// RUN: %clang -### -target powerpc-unknown-aix -S -maltivec -mabi=vec-default %s 2>&1 | \
// RUN: FileCheck %s --check-prefix=DFLTABI --implicit-check-not=vec-extabi
// RUN: %clang -### -target powerpc-unknown-aix -S -mabi=vec-extabi %s 2>&1 | \
// RUN: FileCheck %s --check-prefix=EXTABI
// RUN: %clang -### -target powerpc-unknown-aix -S -maltivec -mabi=vec-extabi %s 2>&1 | \
// RUN: FileCheck %s --check-prefix=EXTABI
/
// EXTABI: "-cc1"
// EXTABI-SAME: "-mabi=vec-extabi"
// DFLTABI: "-cc1"
// DFLTABI-SAME: "-mabi=vec-default"

View File

@ -2,11 +2,11 @@
// RUN: | FileCheck %s -check-prefix=EXTABI
// RUN: %clang -target powerpc64-ibm-aix-xcoff -mcpu=pwr8 -E -dM -maltivec -mabi=vec-extabi %s -o - 2>&1 \
// RUN: | FileCheck %s -check-prefix=EXTABI
// RUN: not %clang -target powerpc-ibm-aix-xcoff -mcpu=pwr8 -E -dM -maltivec -mabi=vec-default %s 2>&1 \
// RUN: %clang -target powerpc-ibm-aix-xcoff -mcpu=pwr8 -E -dM -maltivec -mabi=vec-default %s 2>&1 \
// RUN: | FileCheck %s -check-prefix=DFLTABI
// RUN: not %clang -target powerpc64-ibm-aix-xcoff -mcpu=pwr8 -E -dM -maltivec -mabi=vec-default %s 2>&1 \
// RUN: %clang -target powerpc64-ibm-aix-xcoff -mcpu=pwr8 -E -dM -maltivec -mabi=vec-default %s 2>&1 \
// RUN: | FileCheck %s -check-prefix=DFLTABI
// EXTABI: #define __EXTABI__
// DFLTABI: The default Altivec ABI on AIX is not yet supported, use '-mabi=vec-extabi' for the extended Altivec ABI
// EXTABI: #define __EXTABI__
// DFLTABI-NOT: #define __EXTABI__