Removes duplicated SIMD loads and store instructions and removes
patterns involving GlobalAddresses that were not used in any tests.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 38310 Build 38309: arc lint + arc unit
Event Timeline
@sunfish I believe you originally added the GlobalAddress patterns so I wanted to check in with you before removing them. Do you know whether they can ever be used? If so I will add tests for them instead, but I'm not sure I've ever seen a GlobalAddress offset.
LGTM as long as they are not used, but I'd like to check with @sunfish to be sure as well.
This kind of thing ought to have helped code like
extern int A[]; int foo(long x) { return A[x]; }
where instead of doing an i32.add to add A and x<<2, we could put the address of A in the offset of the i32.load. It's nice in theory, but in practice, the .hasNoUnsignedWrap() predicate is almost never something LLVM knows in practice, and I don't think the pattern is safe without it, because wasm load offset arithmetic doesn't wrap. So I'm ok removing these patterns.
llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td | ||
---|---|---|
83 | Why do we not need HasSIMD128 anymore? For other lines that deleted this too |
llvm/lib/Target/WebAssembly/WebAssemblyInstrSIMD.td | ||
---|---|---|
56 | It doesn't look like related to removing the global pattern. It might be better to take this off to a separate patch |
It doesn't look like related to removing the global pattern. It might be better to take this off to a separate patch