[all-commits] [llvm/llvm-project] d60c47: [Clang] Propagate target-features if compatible wh...

Juan Manuel Martinez Caamaño via All-commits all-commits at lists.llvm.org
Fri Sep 8 02:20:38 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d60c47476dde601f1e48d44717ef23b7f1006fe6
      https://github.com/llvm/llvm-project/commit/d60c47476dde601f1e48d44717ef23b7f1006fe6
  Author: Juan Manuel MARTINEZ CAAMAÑO <juamarti at amd.com>
  Date:   2023-09-08 (Fri, 08 Sep 2023)

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

  Log Message:
  -----------
  [Clang] Propagate target-features if compatible when using mlink-builtin-bitcode

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.

Reviewed By: arsenm

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




More information about the All-commits mailing list