Issue 76487
Summary missed optimization: redundant store is not optimized away (test case with struct)
Labels new issue
Assignees
Reporter k-arrows
    Test case from gcc testsuite (https://github.com/gcc-mirror/gcc/blob/master/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-85.c)
```c
struct X { int i; int j; };

struct X x, y;
void foo ()
{
  x.i = 1;
  y = x;
  y.i = 1; // redundant
}
```
https://godbolt.org/z/nEzqGx57h

The last store in the function `foo` is redundant and can be optimized away.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to