llvm / llvm/llvm-project

[AArch64] Support `__attribute__((target("+frintts")))`

Open
#199,212 1 comment 0 reactions 0 assignees View on GitHub
clang:frontend
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

This code:

```c
#include
__attribute__((target("+frintts")))
float64x2_t foo(float64x2_t a) {
return vrnd64xq_f64(a);
}
```

doesn't compile with clang, whereas it does with gcc. https://godbolt.org/z/xWGT5bcne

(clang does support `__attribute__((target("arch=armv8.5-a")))`, which also mostly works equivalently in gcc, but in gcc it is a complete override of the global `-march=...` (not sure which is the correct behavior, if there even is one), whereas in clang it's treated as additional extensions - https://godbolt.org/z/vc5qPnWaM - so AFAICT there's currently no way to get consistent non-overriding behavior across gcc and clang without just doing some `#if __clang__` logic)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.