[PATCH] D143467: [PowerPC] Add target feature requirement to builtins

Nemanja Ivanovic via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 20 10:05:03 PDT 2023


nemanjai added a comment.

In D143467#4195474 <https://reviews.llvm.org/D143467#4195474>, @qiucf wrote:

> - For builtins with matching instruction, use the required ISA/vector version
> - For the rest builtins used in altivec.h, use requirements specified by the header
> - Keep the feature checks in SemaChecking as-is, since they give user useful message (`only available on POWER8 or later CPUs` instead of `requires isa-v207-instructions to be enabled`)
>   - `lharx` and similar instructions exist since ISA v2.06 (Power 7), while SemaChecking.cpp requires ISA v2.07 (Power 8)

There are quite a number of Power7 CPU's that do not have `l[bh]arx`. These were a late addition (i.e. in 2.06b). We should only emit it on Power8.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143467/new/

https://reviews.llvm.org/D143467



More information about the cfe-commits mailing list