llvm-project/clang/test/Driver/aix-mcpu-default.c
Steven Wan ba4afe6f7a [AIX] Change the default target CPU to power4 for AIX on Power
Summary: This patch changes the AIX default target CPU to power4 since this is the the lowest arch for the lowest OS level supported.

Reviewers: hubert.reinterpretcast, cebowleratibm, daltenty

Reviewed By: hubert.reinterpretcast

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D80835
2020-06-03 13:50:26 -04:00

17 lines
729 B
C

// Check that the target cpu defaults to power4 on AIX.
// RUN: %clang -no-canonical-prefixes %s -### -c 2>&1 \
// RUN: -target powerpc-ibm-aix \
// RUN: | FileCheck --check-prefix=CHECK-MCPU-DEFAULT %s
// CHECK-MCPU-DEFAULT-NOT: warning:
// CHECK-MCPU-DEFAULT: {{.*}}clang{{.*}}" "-cc1"
// CHECK-MCPU-DEFAULT: "-target-cpu" "pwr4"
// Check that the user is able to overwrite the default with '-mcpu'.
// RUN: %clang -no-canonical-prefixes %s -### -c 2>&1 \
// RUN: -mcpu=pwr6 \
// RUN: -target powerpc-ibm-aix \
// RUN: | FileCheck --check-prefix=CHECK-MCPU-USER %s
// CHECK-MCPU-USER-NOT: warning:
// CHECK-MCPU-USER: {{.*}}clang{{.*}}" "-cc1"
// CHECK-MCPU-USER: "-target-cpu" "pwr6"