| Issue |
71130
|
| Summary |
missed optimization for "length" of (a, b)
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
k-arrows
|
Consider the following function.
https://godbolt.org/z/PfhEMPT3z
```cpp
bool lenzero(int a, int b) {
return (b < a ? 0 : b - a + 1) == 0;
}
```
In the function `lenzero`, `(b < a ? 0 : b - a + 1)` represents the "length" of a given set of integers (a, b). In that sense, I don't think this function is too artificial.
Alive2:
https://alive2.llvm.org/ce/z/z4jYgg
Original GCC bugzilla issue:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102138
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs