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

    <tr>
        <th>Summary</th>
        <td>
            Smeantics of rounding mode for constrained.rint (and some others) is unclear
        </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>
    The [docs](https://llvm.org/docs/LangRef.html#llvm-experimental-constrained-rint-intrinsic) for [`llvm.experimental.constrained.rint`](https://llvm.org/docs/LangRef.html#id2295) say

>  The rounding mode is described, not determined, by the rounding mode argument. The actual rounding mode is determined by the runtime floating-point environment. The rounding mode argument is only intended as information to the compiler.

So... what happens when the rounding mode argument and the runtime rounding mode disagree? I assume it would be optimized using one mode but actually executed using the other. Is that considered UB/poison, or some sort of non-determinism?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycU82OpDYQfhpzKTWiDXRPHzjsZIK0UU67yQMYu4CKTBnZ5Z3tPH1kMrM7k6xyyAUkqO-nPvszKdHCiIPqH1X_VJksa4jDJ-PnXzIv1RTcffhtRVD9ows2qf5J6YdVZE-q_aD0qPTo_ZetDnFRejxG9Pir4eUTzvUqm1e6LQMn_LpjpA1ZjD_ZwEmiIUZ3isRyIpZInMgqfYM5xKKnLs1B_RZZv0HWBakuzf_yRE7rW1_Ukrmr5kk1H16e7c8AZeMYMjviBbbgECiBw2QjTeiU_gk4CDgUjFuxUr5Md5B_wUxccnFeH5TGSjb-R8yvRN9YMgttCLMPRoiX0x6IBZC_UAz8nfHHaoUzsL8DsSA7dGASEM8hbkYoMEg4VGzYdvIY67cBfA51XcPzagRWs-_ICZ5X5P9YDgy7d67fjzlKZomIqh3hI5iU8oZAAs8hewcTQtiFNvoTHeRUUIHxb-SU5SUzfwf8ijbLt6GiF2TFWMPHBFLslrtBDiM6-P1R6XEPlAKXswkRUtgQUogCYQYOfHoNndKm2rFyQ-tu7c1UOJyvTdd3rb711Tq43kwWb5d2us2TvZzb66V1nelba6_Y4lzRoBvdNefmctbnru9rbR7QWZwa83DubGdV1-BmyNevl7KilDIO1-v5pitvJvTp6J_WjM9w_FRalzrG4ejOlJekusZTkvSdRUg8Dp83NCxkU9nrffClR__sCyj9UI7riOPIL5USUILM1qOJVY5-eF-mhWTNU23D9tKsl9dpj-EPtKL0eJguNTuW-isAAP__lZV8pQ">