skachkov-sc wrote:
I think we should also check this optimization for non-byte stores, e.g.
```
define i32 @f(ptr %ptr)
%ptr1 = getelementptr inbounds i8, ptr %ptr, i64 2
store i16 0, ptr %ptr, align 2
store i16 0, ptr %ptr1, align 2
%L = load i32, ptr %ptr, align 4
```
GVN should
https://github.com/nikic requested changes to this pull request.
I don't like the overall approach of assembling this from individual byte-sized
loads here. What I would expect to see is more something along these lines: If
we find a clobbering store that a) only clobbers some subset of the loa