[PATCH] D159206: [Clang] Propagate target-features if compatible when using mlink-builtin-bitcode

Juan Manuel Martinez CaamaƱo via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 30 07:42:12 PDT 2023


jmmartinez created this revision.
jmmartinez added reviewers: arsenm, Pierre-vh, yaxunl, jhuber6.
Herald added a project: All.
jmmartinez requested review of this revision.
Herald added subscribers: cfe-commits, wdng.
Herald added a project: clang.

Buitlins from AMD's device-libs are compiled without specifying a
target-cpu, which results in builtins without the target-features
attribute set.

Before this patch, when linking this builtins with -mlink-builtin-bitcode
the target-features were not propagated in the incoming builtins.

With this patch, the default target features are propagated
if they are compatible with the target-features in the incoming builtin.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D159206

Files:
  clang/lib/CodeGen/CGCall.cpp
  clang/test/CodeGen/link-builtin-bitcode.c
  clang/test/CodeGenCUDA/link-builtin-bitcode-gpu-attrs-preserved.cu

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D159206.554720.patch
Type: text/x-patch
Size: 8791 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230830/933b92c7/attachment.bin>


More information about the cfe-commits mailing list