<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/57900>57900</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Arm ACLE intrinsics for FRINT are incorrectly named
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          minoki
      </td>
    </tr>
</table>

<pre>
    [ACLE](https://arm-software.github.io/acle/main/acle.html#floating-point-data-processing-intrinsics) specifies the following intrinsics in `<arm_acle.h>`:

```c
float __rint32zf(float);
double __rint32z(double);
float __rint64zf(float);
double __rint64z(double);
float __rint32xf(float);
double __rint32x(double);
float __rint64xf(float);
double __rint64x(double);
```

But [the header file for clang](https://github.com/llvm/llvm-project/blob/e030be64d8c43a56b60a90b70765fc795e177e9c/clang/lib/Headers/arm_acle.h#L642-L683) defines them with an extra `f` prefix:

```c
float __frint32zf(float);
double __frint32z(double);
float __frint64zf(float);
double __frint64z(double);
float __frint32xf(float);
double __frint32x(double);
float __frint64xf(float);
double __frint64x(double);
```

A test case:

```c
#include <stdio.h>
#include <math.h>
#include <arm_acle.h>

int main(void) {
#if defined(__ARM_FEATURE_FRINT)
    puts("__ARM_FEATURE_FRINT is defined.");
    printf("__rint32z(%g) = %a\n", INFINITY, __rint32z(INFINITY));
    printf("__rint64x(%g) = %a\n", NAN, __rint64x(NAN));
#else
    puts("__ARM_FEATURE_FRINT is not defined.");
#endif
}
```

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVVU1v4yAQ_TX4ghIR8OfBB6dptJW6OVTdw54ibEPCLjaRwW26v34HO9mkUrp1I8fAzOPNMDxDaeq3HEXL4u7xHkUrRNO9cweLWIHoGh7eNTNrpHvlnZjvlNv35VwZ76i0gKbhqj2N5nvXaESZ1IY71e5mB6NaN6u547NDZyphrbeCrVOtVZVFNMP2ICollbDY7QWWRmvzCih8QUEXo5ggdge5bMdAiN0PpgKRFSLnN1iGpxrHQx54uwUex-gfCWsbTBAWseWIqU1fanEBAWY0XYOuieJwAhGAPiVi9Dglo-OEjCYQAegm0b-aXRdy2TsMkvAbshe8Fh2WSvvN6XClebu7pZOTNCrTwEDrl3Pjd_6XqCCzdalNCY0gjJQiDuu0ChmP4jImPCNlQpI4klWSRWKRJCKrADpGAyLlJ34bcrGjKM9CoOwxDunsMU6Zl1MtpGpHMTX4FXLCvMXi6DruNSThjw8dYI4TtSMniUdOUY-cJB85RT9ykoDkFAXJSRKSX9ZQgZ2wDlfcik9KDVuo2kr3tcDwjVtXKzN-4De8DXf7D53vj4eriJA7Hs-p9MWo2usEJcsLhTzJBjzpdls8fd-u74vnH0_32_XTw-bZr3XAYvgdegcKTBGlN5BY2TPVHBDXRRrm-irK8-yLZhCNdkNSbIWhz1F01w7T7_DDZv2weXj-6fvXUy727PMo48b9J8qm2FwCjOjB9I4bKiU07Ob0UrTGfVQOT9bWSp5GyeqmlAKRL-KYpdGCZGlQ56zOWMYDp5wWedE12N9a11eFP6LG8HBdgaMyXQeHj37DLW9EHfSdzr98bilre-GPnSjJCAn2ecIWZVbSuiyzLKIkCUlCUy6zOFxwspAi0LyEUvlrFZbdilc8UPgSRKtA5ZRQSjJKFzTMKJuXsYh5FMoyFEKmqUQhESBXPfd5zE23C7p8SKnsdxacWllnL04O1-quFWIIB_y8d3vT5Y1qzW8VDJHzIfO_KSZWzQ">