llvm-project/clang/test/CodeGen/aarch64-always-inline-feature-bug.c
Matthias Braun b0378e7ca9
[AArch64TargetParser]Fix reconstructFromParsedFeatures ignoring negative features (#142236)
The `targetFeatureToExtension` function used by
reconstructFromParsedFeatures only found positive `+FEATURE` strings,
but not negative `-FEATURE` strings. Extend the function to handle both
to fix `reconstructFromParsedFeatures`.
2025-06-16 12:55:12 -07:00

9 lines
413 B
C

// RUN: %clang_cc1 -triple aarch64-- -target-feature +neon -target-feature +sve\
// RUN: -target-feature -sve -emit-llvm %s -o - | FileCheck %s
// Reproducer for bug where clang would reject always_inline for unrelated
// target features if they were disable with `-feature` on the command line.
// CHECK: @bar
__attribute__((always_inline)) __attribute__((target("neon"))) void foo() {}
void bar() { foo(); }