| Issue |
173905
|
| Summary |
Optimize same value assigned to pointers
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
Rosdf
|
https://godbolt.org/z/9xfPcneh4
```c++
int set(unsigned int* num1, unsigned int* num2, const unsigned int value) {
*num1 = value;
*num2 = value;
return *num1 + *num2;
}
```
compiler does not recognize, that result can be calculated without reading values from pointers
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs