[all-commits] [llvm/llvm-project] 5eaf5b: [PowerPC] Restrict various P10 options to P10 only.

Amy Kwan via All-commits all-commits at lists.llvm.org
Tue Oct 19 07:05:35 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5eaf5b916146dff0a02d8d937e88d8fb128640d2
      https://github.com/llvm/llvm-project/commit/5eaf5b916146dff0a02d8d937e88d8fb128640d2
  Author: Amy Kwan <amy.kwan1 at ibm.com>
  Date:   2021-10-19 (Tue, 19 Oct 2021)

  Changed paths:
    M clang/lib/Basic/Targets/PPC.cpp
    A clang/test/Driver/ppc-p10-features-support-check.c

  Log Message:
  -----------
  [PowerPC] Restrict various P10 options to P10 only.

This patch attempts to restrict the following P10 options:
```
-mprefixed
-mpcrel
-mpaired-vector-memops
```
To P10 only. This will prevent the use of these options on P9 and earlier.

The behaviour of this patch looks like the following on pre-P10:
```
$ clang -mcpu=pwr9 -mpaired-vector-memops test.c -o test
error: option '-mpaired-vector-memops' cannot be specified without '-mcpu=pwr10'
$ clang -mcpu=pwr9 -mprefixed test.c -o test
error: option '-mprefixed' cannot be specified without '-mcpu=pwr10'
$ clang -mcpu=pwr9 -mprefixed -mpcrel test.c -o test
error: option '-mpcrel' cannot be specified without '-mcpu=pwr10 -mprefixed'
$ clang -mcpu=pwr9 -mpcrel -mprefixed test.c -o test
error: option '-mpcrel' cannot be specified without '-mcpu=pwr10 -mprefixed'
$ clang -mcpu=pwr9 -mpcrel test.c -o test
error: option '-mpcrel' cannot be specified without '-mcpu=pwr10 -mprefixed'
```

Differential Revision: https://reviews.llvm.org/D109652




More information about the All-commits mailing list