1 // RUN: %clang -target powerpc64le-unknown-linux-gnu -S -emit-llvm \
2 // RUN: -mcpu=pwr10 -mpaired-vector-memops %s -o - | FileCheck %s \
3 // RUN: --check-prefix=HASPAIRED
4 // RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \
5 // RUN: -mcpu=pwr9 -mpaired-vector-memops %s 2>&1 | FileCheck %s \
6 // RUN: --check-prefix=NOPAIRED
7 // RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \
8 // RUN: -mpaired-vector-memops %s 2>&1 | FileCheck %s \
9 // RUN: --check-prefix=NOPAIRED
11 // RUN: %clang -target powerpc64le-unknown-linux-gnu -S -emit-llvm \
12 // RUN: -mcpu=pwr10 -mprefixed %s -o - | FileCheck %s \
13 // RUN: --check-prefix=HASPREFIXED
14 // RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \
15 // RUN: -mcpu=pwr9 -mprefixed %s 2>&1 | FileCheck %s \
16 // RUN: --check-prefix=NOPREFIXED
17 // RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \
18 // RUN: -mprefixed %s 2>&1 | FileCheck %s \
19 // RUN: --check-prefix=NOPREFIXED
21 // RUN: %clang -target powerpc64le-unknown-linux-gnu -S -emit-llvm \
22 // RUN: -mcpu=pwr10 -mpcrel %s -o - | FileCheck %s \
23 // RUN: --check-prefix=HASPCREL
24 // RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \
25 // RUN: -mcpu=pwr9 -mpcrel %s 2>&1 | FileCheck %s \
26 // RUN: --check-prefix=NOPCREL
27 // RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \
28 // RUN: -mpcrel %s 2>&1 | FileCheck %s \
29 // RUN: --check-prefix=NOPCREL
31 // RUN: %clang -target powerpc64le-unknown-linux-gnu -S -emit-llvm \
32 // RUN: -mcpu=pwr10 -mpcrel -mprefixed %s -o - | FileCheck %s \
33 // RUN: --check-prefix=HASPCREL-PREFIX
34 // RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \
35 // RUN: -mcpu=pwr9 -mpcrel -mprefixed %s 2>&1 | FileCheck %s \
36 // RUN: --check-prefix=NOPCREL-PREFIX
37 // RUN: not %clang -target powerpc64le-unknown-linux-gnu -fsyntax-only \
38 // RUN: -mpcrel -mprefixed %s 2>&1 | FileCheck %s \
39 // RUN: --check-prefix=NOPCREL-PREFIX
41 int test_p10_features(void) {
45 // HASPAIRED: test_p10_features() #0 {
46 // HASPAIRED: attributes #0 = {
47 // HASPAIRED-SAME: +paired-vector-memops
48 // NOPAIRED: option '-mpaired-vector-memops' cannot be specified without '-mcpu=pwr10'
50 // HASPREFIXED: test_p10_features() #0 {
51 // HASPREFIXED: attributes #0 = {
52 // HASPREFIXED-SAME: +prefix-instrs
53 // NOPREFIXED: option '-mprefixed' cannot be specified without '-mcpu=pwr10'
55 // HASPCREL: test_p10_features() #0 {
56 // HASPCREL: attributes #0 = {
57 // HASPCREL-SAME: +pcrelative-memops
58 // NOPCREL: option '-mpcrel' cannot be specified without '-mcpu=pwr10 -mprefixed'
60 // HASPCREL-PREFIX: test_p10_features() #0 {
61 // HASPCREL-PREFIX: attributes #0 = {
62 // HASPCREL-PREFIX-SAME: +pcrelative-memops
63 // HASPCREL-PREFIX-SAME: +prefix-instrs
64 // NOPCREL-PREFIX: option '-mpcrel' cannot be specified without '-mcpu=pwr10 -mprefixed'