diff --git a/clang/lib/Basic/Targets/OSTargets.h b/clang/lib/Basic/Targets/OSTargets.h --- a/clang/lib/Basic/Targets/OSTargets.h +++ b/clang/lib/Basic/Targets/OSTargets.h @@ -743,7 +743,6 @@ // AIX sets FLT_EVAL_METHOD to be 1. unsigned getFloatEvalMethod() const override { return 1; } - bool hasInt128Type() const override { return false; } bool defaultsToAIXPowerAlignment() const override { return true; } }; diff --git a/clang/test/AST/ast-print-int128.cpp b/clang/test/AST/ast-print-int128.cpp --- a/clang/test/AST/ast-print-int128.cpp +++ b/clang/test/AST/ast-print-int128.cpp @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -ast-print -std=c++20 %s -o - -triple x86_64-linux | FileCheck %s +// RUN: %clang_cc1 -ast-print -std=c++20 %s -o - -triple powerpc64-ibm-aix-xcoff | FileCheck %s template struct enable_if { diff --git a/clang/test/Analysis/sval-dump-int128.c b/clang/test/Analysis/sval-dump-int128.c --- a/clang/test/Analysis/sval-dump-int128.c +++ b/clang/test/Analysis/sval-dump-int128.c @@ -1,4 +1,5 @@ // RUN: %clang_analyze_cc1 -triple x86_64-linux-gnu -analyzer-checker=debug.ExprInspection %s -verify +// RUN: %clang_analyze_cc1 -triple powerpc64-ibm-aix-xcoff -analyzer-checker=debug.ExprInspection %s -verify void clang_analyzer_dump(unsigned __int128 x); diff --git a/clang/test/CodeGen/dbg-const-int128.c b/clang/test/CodeGen/dbg-const-int128.c --- a/clang/test/CodeGen/dbg-const-int128.c +++ b/clang/test/CodeGen/dbg-const-int128.c @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-unknown-linux -S -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s +// RUN: %clang_cc1 -triple powerpc64-ibm-aix-xcoff -S -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s // CHECK: !DIGlobalVariable({{.*}} // CHECK-NOT: expr: diff --git a/clang/test/CodeGen/debug-info.c b/clang/test/CodeGen/debug-info.c --- a/clang/test/CodeGen/debug-info.c +++ b/clang/test/CodeGen/debug-info.c @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -triple x86_64-unk-unk -o - -emit-llvm -debug-info-kind=limited %s | FileCheck %s +// RUN: %clang_cc1 -triple powerpc64-ibm-aix-xcoff -o - -emit-llvm -debug-info-kind=limited %s | FileCheck %s // PR3023 void convert(void) { diff --git a/clang/test/CodeGen/extend-arg-64.c b/clang/test/CodeGen/extend-arg-64.c --- a/clang/test/CodeGen/extend-arg-64.c +++ b/clang/test/CodeGen/extend-arg-64.c @@ -16,6 +16,12 @@ // RUN: %s -emit-llvm -o - | FileCheck %s \ // RUN: --implicit-check-not "ext {{.*}}to i64" +// The option isn't supported on ppc, no effect +// RUN: %clang_cc1 -DD128 -triple powerpc64-ibm-aix-xcoff -fextend-arguments=64 \ +// RUN: %s -emit-llvm -o - | FileCheck %s \ +// RUN: --implicit-check-not "ext {{.*}}to i64" + + int vararg(int, ...); void knr(); diff --git a/clang/test/CodeGen/ppc-varargs-struct.c b/clang/test/CodeGen/ppc-varargs-struct.c --- a/clang/test/CodeGen/ppc-varargs-struct.c +++ b/clang/test/CodeGen/ppc-varargs-struct.c @@ -2,6 +2,7 @@ // REQUIRES: asserts // RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s // RUN: %clang_cc1 -triple powerpc-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-PPC +// RUN: %clang_cc1 -triple powerpc64-ibm-aix-xcoff -emit-llvm -o - %s | FileCheck %s #include diff --git a/clang/test/CodeGen/uint128_t.c b/clang/test/CodeGen/uint128_t.c --- a/clang/test/CodeGen/uint128_t.c +++ b/clang/test/CodeGen/uint128_t.c @@ -1,4 +1,5 @@ // RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-apple-darwin9 +// RUN: %clang_cc1 %s -emit-llvm -o - -triple=powerpc64-ibm-aix-xcoff typedef unsigned long long uint64_t; extern uint64_t numer; diff --git a/clang/test/CodeGenCXX/debug-info-enum-i128.cpp b/clang/test/CodeGenCXX/debug-info-enum-i128.cpp --- a/clang/test/CodeGenCXX/debug-info-enum-i128.cpp +++ b/clang/test/CodeGenCXX/debug-info-enum-i128.cpp @@ -1,5 +1,6 @@ // RUN: %clang_cc1 %s -triple x86_64-windows-msvc -gcodeview -debug-info-kind=limited -emit-llvm -o - | FileCheck %s // RUN: %clang_cc1 %s -triple x86_64-linux-gnu -debug-info-kind=limited -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 %s -triple powerpc64-ibm-aix-xcoff -debug-info-kind=limited -emit-llvm -o - | FileCheck %s // FIXME: llvm.org/pr51221, the APSInt leaks // UNSUPPORTED: asan diff --git a/clang/test/Driver/types.c b/clang/test/Driver/types.c --- a/clang/test/Driver/types.c +++ b/clang/test/Driver/types.c @@ -12,8 +12,8 @@ // RUN: not %clang -c --target=powerpc-ibm-aix -fsyntax-only %s \ // RUN: 2>&1 | FileCheck %s -// RUN: not %clang -c --target=powerpc64-ibm-aix -fsyntax-only %s \ -// RUN: 2>&1 | FileCheck %s +// RUN: %clang -c --target=powerpc64-ibm-aix -fsyntax-only %s \ +// RUN: 2>&1 void a() { __int128_t s; diff --git a/clang/test/Preprocessor/init-ppc64.c b/clang/test/Preprocessor/init-ppc64.c --- a/clang/test/Preprocessor/init-ppc64.c +++ b/clang/test/Preprocessor/init-ppc64.c @@ -811,6 +811,7 @@ // PPC64-AIX:#define __SIG_ATOMIC_WIDTH__ 32 // PPC64-AIX:#define __SIZEOF_DOUBLE__ 8 // PPC64-AIX:#define __SIZEOF_FLOAT__ 4 +// PPC64-AIX:#define __SIZEOF_INT128__ 16 // PPC64-AIX:#define __SIZEOF_INT__ 4 // PPC64-AIX:#define __SIZEOF_LONG_DOUBLE__ 8 // PPC64-AIX:#define __SIZEOF_LONG_LONG__ 8 diff --git a/clang/test/Sema/128bitint.c b/clang/test/Sema/128bitint.c --- a/clang/test/Sema/128bitint.c +++ b/clang/test/Sema/128bitint.c @@ -1,5 +1,7 @@ // RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-apple-darwin9 %s -DHAVE // RUN: %clang_cc1 -fsyntax-only -verify -triple i686-linux-gnu %s -DHAVE_NOT +// RUN: %clang_cc1 -fsyntax-only -verify -triple powerpc64-ibm-aix-xcoff %s -DHAVE +// RUN: %clang_cc1 -fsyntax-only -verify -triple powerpc-ibm-aix-xcoff %s -DHAVE_NOT #ifdef HAVE typedef int i128 __attribute__((__mode__(TI))); diff --git a/clang/test/Sema/const-eval.c b/clang/test/Sema/const-eval.c --- a/clang/test/Sema/const-eval.c +++ b/clang/test/Sema/const-eval.c @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-linux %s -Wno-tautological-pointer-compare -Wno-pointer-to-int-cast +// RUN: %clang_cc1 -fsyntax-only -verify -triple powerpc64-ibm-aix-xcoff %s -Wno-tautological-pointer-compare -Wno-pointer-to-int-cast #define EVAL_EXPR(testno, expr) enum { test##testno = (expr) }; struct check_positive##testno { int a[test##testno]; }; int x; diff --git a/clang/test/Sema/redefine_extname.c b/clang/test/Sema/redefine_extname.c --- a/clang/test/Sema/redefine_extname.c +++ b/clang/test/Sema/redefine_extname.c @@ -1,4 +1,5 @@ // RUN: %clang_cc1 -triple=x86_64-unknown-linux -Wpragmas -verify %s +// RUN: %clang_cc1 -triple=powerpc64-ibm-aix-xcoff -Wpragmas -verify %s // Check that pragma redefine_extname applies to external declarations only. #pragma redefine_extname foo_static bar_static diff --git a/clang/test/Sema/types.c b/clang/test/Sema/types.c --- a/clang/test/Sema/types.c +++ b/clang/test/Sema/types.c @@ -3,6 +3,7 @@ // RUN: %clang_cc1 %s -fblocks -pedantic -verify -triple=x86_64-unknown-linux // RUN: %clang_cc1 %s -fblocks -pedantic -verify -triple=x86_64-unknown-linux-gnux32 // RUN: %clang_cc1 %s -fblocks -pedantic -pedantic -verify -triple=arm64_32-apple-ios7.0 +// RUN: %clang_cc1 %s -fblocks -pedantic -verify -triple=powerpc64-ibm-aix-xcoff // rdar://6097662 typedef int (*T)[2]; diff --git a/llvm/test/CodeGen/PowerPC/ctrloop-i128.ll b/llvm/test/CodeGen/PowerPC/ctrloop-i128.ll --- a/llvm/test/CodeGen/PowerPC/ctrloop-i128.ll +++ b/llvm/test/CodeGen/PowerPC/ctrloop-i128.ll @@ -1,6 +1,5 @@ -; RUN: llc -O1 -verify-machineinstrs < %s -target datalayout = "E-m:e-i64:64-n32:64" -target triple = "powerpc64-unknown-linux-gnu" +; RUN: llc -O1 -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu < %s +; RUN: llc -O1 -verify-machineinstrs -mtriple=powerpc64-ibm-aix-xcoff < %s ; Function Attrs: uwtable define fastcc void @_Crash_Fn() unnamed_addr #0 { diff --git a/llvm/test/CodeGen/PowerPC/int128_ldst.ll b/llvm/test/CodeGen/PowerPC/int128_ldst.ll --- a/llvm/test/CodeGen/PowerPC/int128_ldst.ll +++ b/llvm/test/CodeGen/PowerPC/int128_ldst.ll @@ -17,6 +17,9 @@ ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \ ; RUN: -mcpu=pwr8 \ ; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P8 +; RUN: llc -verify-machineinstrs -mtriple=powerpc64-ibm-aix-xcoff \ +; RUN: -mcpu=pwr8 \ +; RUN: < %s | FileCheck %s --check-prefixes=CHECK,CHECK-PREP10,CHECK-P8 ; Function Attrs: norecurse nounwind readonly uwtable willreturn define dso_local i128 @ld_0___int128___int128(i64 %ptr) { diff --git a/llvm/test/CodeGen/PowerPC/ppc64-i128-abi.ll b/llvm/test/CodeGen/PowerPC/ppc64-i128-abi.ll --- a/llvm/test/CodeGen/PowerPC/ppc64-i128-abi.ll +++ b/llvm/test/CodeGen/PowerPC/ppc64-i128-abi.ll @@ -5,9 +5,15 @@ ; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \ ; RUN: -mcpu=pwr8 < %s | FileCheck %s -check-prefix=CHECK-BE +; RUN: llc -verify-machineinstrs -mtriple=powerpc64-ibm-aix-xcoff \ +; RUN: -mcpu=pwr8 < %s | FileCheck %s -check-prefix=CHECK-BE + ; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \ ; RUN: -mcpu=pwr8 -mattr=-vsx < %s | FileCheck %s -check-prefix=CHECK-NOVSX +; RUN: llc -verify-machineinstrs -mtriple=powerpc64-ibm-aix-xcoff \ +; RUN: -mcpu=pwr8 -mattr=-vsx < %s | FileCheck %s -check-prefix=CHECK-NOVSX + ; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \ ; RUN: -mcpu=pwr8 -mattr=-vsx < %s | FileCheck %s -check-prefix=CHECK-NOVSX \ ; RUN: --implicit-check-not xxswapd @@ -15,6 +21,9 @@ ; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \ ; RUN: -mcpu=pwr8 -mattr=-vsx < %s | FileCheck %s -check-prefix=CHECK-BE-NOVSX +; RUN: llc -verify-machineinstrs -mtriple=powerpc64-ibm-aix-xcoff \ +; RUN: -mcpu=pwr8 -mattr=-vsx < %s | FileCheck %s -check-prefix=CHECK-BE-NOVSX + ; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \ ; RUN: -mcpu=pwr8 -mattr=-vsx < %s | \ ; RUN: FileCheck %s -check-prefix=CHECK-LE-NOVSX --implicit-check-not xxswapd @@ -23,10 +32,16 @@ ; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr < %s | \ ; RUN: FileCheck %s -check-prefix=CHECK-P9 --implicit-check-not xxswapd +; RUN: llc -verify-machineinstrs -mtriple=powerpc64-ibm-aix-xcoff \ +; RUN: -mcpu=pwr9 -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr < %s | FileCheck %s -check-prefix=CHECK-P9 + ; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \ ; RUN: -mcpu=pwr9 -mattr=-vsx < %s | FileCheck %s -check-prefix=CHECK-NOVSX \ ; RUN: --implicit-check-not xxswapd +; RUN: llc -verify-machineinstrs -mtriple=powerpc64-ibm-aix-xcoff \ +; RUN: -mcpu=pwr9 -mattr=-vsx < %s | FileCheck %s -check-prefix=CHECK-NOVSX + ; RUN: llc -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \ ; RUN: -mcpu=pwr9 -mattr=-power9-vector -mattr=-direct-move < %s | \ ; RUN: FileCheck %s -check-prefix=CHECK-LE --implicit-check-not xxswapd @@ -208,19 +223,19 @@ ; CHECK-P9-LABEL: @call_v1i128_increment_by_one ; CHECK-P9: lxv -; CHECK-P9: bl v1i128_increment_by_one +; CHECK-P9: bl {{.?}}v1i128_increment_by_one ; CHECK-P9: blr ; CHECK-BE-LABEL: @call_v1i128_increment_by_one ; CHECK-BE: lxvw4x 34, {{[0-9]+}}, {{[0-9]+}} ; CHECK-BE-NOT: xxswapd 34, {{[0-9]+}} -; CHECK-BE: bl v1i128_increment_by_one +; CHECK-BE: bl {{.?}}v1i128_increment_by_one ; CHECK-BE: blr ; CHECK-NOVSX-LABEL: @call_v1i128_increment_by_one ; CHECK-NOVSX: lvx 2, {{[0-9]+}}, {{[0-9]+}} ; CHECK-NOVSX-NOT: xxswapd {{[0-9]+}}, {{[0-9]+}} -; CHECK-NOVSX: bl v1i128_increment_by_one +; CHECK-NOVSX: bl {{.?}}v1i128_increment_by_one ; CHECK-NOVSX: blr } @@ -239,7 +254,7 @@ ; CHECK-P9-LABEL: @call_v1i128_increment_by_val ; CHECK-P9-DAG: lxv v2 ; CHECK-P9-DAG: lxv v3 -; CHECK-P9: bl v1i128_increment_by_val +; CHECK-P9: bl {{.?}}v1i128_increment_by_val ; CHECK-P9: blr ; CHECK-BE-LABEL: @call_v1i128_increment_by_val @@ -248,7 +263,7 @@ ; CHECK-BE-DAG: lxvw4x 35, {{[0-9]+}}, {{[0-9]+}} ; CHECK-BE-NOT: xxswapd 34, {{[0-9]+}} ; CHECK-BE-NOT: xxswapd 35, {{[0-9]+}} -; CHECK-BE: bl v1i128_increment_by_val +; CHECK-BE: bl {{.?}}v1i128_increment_by_val ; CHECK-BE: blr ; CHECK-NOVSX-LABEL: @call_v1i128_increment_by_val @@ -256,7 +271,7 @@ ; CHECK-NOVSX-DAG: lvx 3, {{[0-9]+}}, {{[0-9]+}} ; CHECK-NOVSX-NOT: xxswapd 34, {{[0-9]+}} ; CHECK-NOVSX-NOT: xxswapd 35, {{[0-9]+}} -; CHECK-NOVSX: bl v1i128_increment_by_val +; CHECK-NOVSX: bl {{.?}}v1i128_increment_by_val ; CHECK-NOVSX: blr } @@ -275,13 +290,13 @@ ; CHECK-BE-LABEL: @call_i128_increment_by_one ; CHECK-BE-DAG: ld 3, 0([[BASEREG:[0-9]+]]) ; CHECK-BE-DAG: ld 4, 8([[BASEREG]]) -; CHECK-BE: bl i128_increment_by_one +; CHECK-BE: bl {{.?}}i128_increment_by_one ; CHECK-BE: blr ; CHECK-NOVSX-LABEL: @call_i128_increment_by_one ; CHECK-NOVSX-DAG: ld 3, 0([[BASEREG:[0-9]+]]) ; CHECK-NOVSX-DAG: ld 4, 8([[BASEREG]]) -; CHECK-NOVSX: bl i128_increment_by_one +; CHECK-NOVSX: bl {{.?}}i128_increment_by_one ; CHECK-NOVSX: blr } @@ -303,7 +318,7 @@ ; CHECK-BE-DAG: ld 4, 8([[P1BASEREG]]) ; CHECK-BE-DAG: ld 5, 0([[P2BASEREG:[0-9]+]]) ; CHECK-BE-DAG: ld 6, 8([[P2BASEREG]]) -; CHECK-BE: bl i128_increment_by_val +; CHECK-BE: bl {{.?}}i128_increment_by_val ; CHECK-BE: blr ; CHECK-NOVSX-LABEL: @call_i128_increment_by_val @@ -311,7 +326,7 @@ ; CHECK-NOVSX-DAG: ld 4, 8([[P1BASEREG]]) ; CHECK-NOVSX-DAG: ld 5, 0([[P2BASEREG:[0-9]+]]) ; CHECK-NOVSX-DAG: ld 6, 8([[P2BASEREG]]) -; CHECK-NOVSX: bl i128_increment_by_val +; CHECK-NOVSX: bl {{.?}}i128_increment_by_val ; CHECK-NOVSX: blr }