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

    <tr>
        <th>Summary</th>
        <td>
            Armv7 codegen avoids emitting conditional mnemonics for floating-point instructions?
        </td>
    </tr>

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

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

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

<pre>
    Here's an example of `rustc`'s output for a conditional division: <https://rust.godbolt.org/z/b5WvzMx1M>.

The LLVM-IR that I get locally is
```
; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind readnone uwtable willreturn
define dso_local double @test_function(double %x, double %y) unnamed_addr #4 {
start:
  %0 = fdiv double %x, %y
  %_5 = fcmp olt double %x, %y
  %1 = fdiv double 1.000000e+00, %0
  %z.0 = select i1 %_5, double %1, double %0
  ret double %z.0
}
```

We can clearly observe that LLVM is taking a more x86-esque approach, with a conditional move afterwards, and the output assembly/binary confirm this.

Rather than select the value after the execution of the instructions, it could possibly propagate the condition backwards(?) and apply the condition from the selection to the instruction instead.

Ideally we could've had an `vdivmi.f64 d3, d3, d2` in this case, without a conditional move.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyFVNtu2zgQ_Rr5ZRBBF8uSHvSQNDU2QAMsisX2MaDEkcyWIrW8-JKv3yHlNHW6wBqyxCHncnjmkL3ml-4PNJgUtQWmAM9sXiSCHiHZZcZbN9A3rmrvFu9g1AYYDFpx4YRWTAIXR2FpmJT3kJSfDs4tlsZJsacnpEgnzXstXarNRFOv9O-rb8fX53P-nJSf0yR7TLL79f3XAeHLl7-f756-gjswB08woQOpByblBYS9OhOo9VnN8gH2Xg0BEdw7ZwIAmKn2YvRk0FpQejSI9DE4eGPDyF7UQB-vTkJxGijJXi99GBtknGwEf3KsJz5OQkqDzhu1FuQ4ClrmVr9Ea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