https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128045
Bug ID: 128045
Summary: Match pattern for `convert semantics of round(x)
function to floor(x+0.5)` can be simplified
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Keywords: compile-time-hog, easyhack
Severity: enhancement
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
Target Milestone: ---
Currently it does:
```
(simplify
(cond (op:c (minus:s SSA_NAME@0 (floor SSA_NAME@0))
(minus:s (ceil SSA_NAME@0) SSA_NAME@0))
(bt SSA_NAME@0) (bf SSA_NAME@0))
```
But the `SSA_NAME@0` can just be @0 the whole way through. This should remove
an extra check.