https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126745

            Bug ID: 126745
           Summary: a/b -> 1 if it is known that `a==b` in VRP without DOM
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Keywords: easyhack, missed-optimization
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
            Blocks: 126010
  Target Milestone: ---

Take:
```
int f(int a, int b)
{
    if (a != b) __builtin_unreachable();
    return a/b;
}
```

This only is optimized in dom. If we are going to remove dom, then it is best
if the ranger optimizes it.


We need a op1_op2_relation_effect for the division operators.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126010
[Bug 126010] [meta-bug] Remove DOM

Reply via email to