diff --git a/clang/include/clang/Basic/DiagnosticDriverKinds.td b/clang/include/clang/Basic/DiagnosticDriverKinds.td --- a/clang/include/clang/Basic/DiagnosticDriverKinds.td +++ b/clang/include/clang/Basic/DiagnosticDriverKinds.td @@ -542,9 +542,6 @@ 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'">; diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp --- a/clang/lib/Driver/ToolChains/Clang.cpp +++ b/clang/lib/Driver/ToolChains/Clang.cpp @@ -4823,7 +4823,7 @@ 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)) { diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -1859,13 +1859,7 @@ << 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; diff --git a/clang/test/CodeGen/altivec.c b/clang/test/CodeGen/altivec.c --- a/clang/test/CodeGen/altivec.c +++ b/clang/test/CodeGen/altivec.c @@ -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> @@ -52,5 +52,3 @@ vector float vf; vf++; // CHECK: fadd <4 x float> {{.*}} } - -// AIX-ERROR: error: The default Altivec ABI on AIX is not yet supported, use '-mabi=vec-extabi' for the extended Altivec ABI diff --git a/clang/test/Driver/aix-vec-extabi.c b/clang/test/Driver/aix-vec-extabi.c --- a/clang/test/Driver/aix-vec-extabi.c +++ b/clang/test/Driver/aix-vec-extabi.c @@ -1,10 +1,10 @@ // 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: FileCheck %s --check-prefix=EXTABI // RUN: %clang -### -target powerpc-unknown-aix -S -maltivec -mabi=vec-default %s 2>&1 | \ -// RUN: FileCheck %s --check-prefix=ERROR +// RUN: FileCheck %s --check-prefix=DFLTABI + +// EXTABI: "-cc1" +// EXTABI-SAME: "-mabi=vec-extabi" -// ERROR: The default Altivec ABI on AIX is not yet supported, use '-mabi=vec-extabi' for the extended Altivec ABI +// DFLTABI: "-cc1" +// DFLTABI-SAME: "-mabi=vec-default" diff --git a/clang/test/Preprocessor/aix-vec_extabi.c b/clang/test/Preprocessor/aix-vec_extabi.c --- a/clang/test/Preprocessor/aix-vec_extabi.c +++ b/clang/test/Preprocessor/aix-vec_extabi.c @@ -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__