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

            Bug ID: 115238
           Summary: bitwise_inverted_equal_p should handle
                    uniform_integer_cst_p
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

Take:
```
#define vector8 __attribute__((vector_size(8)))

vector8 int f(int a, vector8 int b)
{
        a = 1;
        return a | ((~a) ^ b);
}

vector8 int f1(int a, vector8 int b)
{
        a = 1;
        return a | (~b);
}
```

These 2 should produce the same code but don't currently on some targets.
bitwise_inverted_equal_p needs to be improved to use uniform_integer_cst_p
instead of INTEGER_CST directly.

Reply via email to