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

Qiu Chaofan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 14 22:59:17 PDT 2023


qiucf updated this revision to Diff 505370.
qiucf marked 2 inline comments as done.
qiucf added a comment.

- 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)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143467

Files:
  clang/include/clang/Basic/BuiltinsPPC.def
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/lib/Basic/Targets/PPC.cpp
  clang/lib/CodeGen/CGBuiltin.cpp
  clang/lib/Sema/SemaChecking.cpp
  clang/test/CodeGen/PowerPC/builtins-ppc-altivec.c
  clang/test/CodeGen/PowerPC/builtins-ppc-fma.c
  clang/test/CodeGen/PowerPC/builtins-ppc-fpconstrained.c
  clang/test/CodeGen/PowerPC/builtins-ppc-htm.c
  clang/test/CodeGen/PowerPC/builtins-ppc-p8vector.c
  clang/test/CodeGen/PowerPC/builtins-ppc-vsx.c
  clang/test/CodeGen/PowerPC/builtins-ppc-xlcompat-test.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143467.505370.patch
Type: text/x-patch
Size: 113302 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230315/63511426/attachment-0001.bin>


More information about the cfe-commits mailing list