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

    <tr>
        <th>Summary</th>
        <td>
            arm: no warning when requested ABI cannot be realized due to missing target features
        </td>
    </tr>

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

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

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

<pre>
    On RISCV, when I build code with `llc -mtriple=riscv32 -mattr=-f -target-abi=ilp32f`, I [get a nice warning](https://llvm.godbolt.org/z/W5hvMra96) letting me know that this is a nonsensical combination:
```
Hard-float 'f' ABI can't be used for a target that doesn't support the F instruction set extension (ignoring target-abi)
```
However, when I do something equivalent on ARM, such as `-mtriple=armv8 -float-abi=hard -mattr=-fpregs`, then sadly [there is no warning](https://llvm.godbolt.org/z/xaETffao7). Instead, LLVM silently ignores `-float-abi` and passes float arguments via the `rX` registers -- easily leading to a lot of head-scratching and confusion down the road when functions don't have the ABI that one might expect.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyck9GPozYQxv8a52VEFEyA5IGH7G2jbnWrStvq2tcBD-DW2DnPkNzeX18ZUm3ax5OQkGDs75vvN4PMdvBEjSqfVPm8wVnGEJs3dP0vsx82bTDvza8e3l5--_RF6U9wG8nDC7SzdQa6YAhuVkZQ1c65DrJJor04UsVztNxdCw3ZhCJRFc9ZD5lgHEgybK0qnq27FLpX1S7d-wKqfBpIAMHbjuCG0Vs_qPJZ6cMocmFVnJQ-K3127jpth2Da4GQb4qD0-bvS5z_K8foa8VgpfQRHItYPMBH87cMNZEQBGS2D5SQRPJNn26GDLkyt9Sg2-CSxOyVH67M7_YzRZL0LKKB03Stdw-npBTr0StcCLcHMZKAPERDW7lYtE4jXGp4vlxDTZ4IzWM8S5y6pAZMAfZNkJHhQ-mAHH2Ky_ZCTPv7fUrjRleIDDBOAw0QypqP0dbZXdOQFgofT22sq5LkbATlhekCEcboeYG3vzmTEaB6RXSINfEckSY3RuPfESkaKlNL04QdgfcOffu97DLXSxy28eBZCk0Q-f_7yCmyTf_cOSyC0-v6wWe0AvYELMhPDSgfjME_kheFqcclaVbv4Z6qNNFgWigxZBoRs3Ts4QrMEHQDBBYHQw0hoMu4iSrckmTS64Pt5wWPCzS_3xoBmTb6f_QKSwYSV9YhXWorSkCxzEDzBZIcxkb5QJ9uNaQpzLI64oSavi7Lal_mh3owN9u0eS11WxZFyXR8OfV2UxUHXuqpLxGJjG73T-1wXeZ4Xx3297dt91bVdkWNV6S4ntd_RhNZtl9BDHDaWeaYm13lxqDcOW3K8bLrWnm6w_FVap8WPTTqUtfPAar9zloU_rhErjhqMkypOD7zXFCJ9nYmFzL-b4cOyGJHQ2e9kwMyUcp4s88dsQ08ocyTezNE1_52Zwco4t9suTPcBur-ySwx_USdKnxfrrPT53tu10f8EAAD__1AslDw">