Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 24756 Build 24755: arc lint + arc unit
Event Timeline
Maybe. These functions are all called by target-independent optimizations that presumably are tested elsewhere. shouldExpandBuildVectorWithShuffles is actually never called right now, since we never expand build_vectors (but I'm considering changing that).
lib/Target/WebAssembly/WebAssemblyISelLowering.cpp | ||
---|---|---|
513 | While shuffles are quite large, the alternative is to store each element to the stack, one at a time, and then load them back as a vector. This will often be larger than the corresponding shuffle sequence. And it'll very likely be slower. |
I think we can have test for each of these functions; each selection should affect code generation of some constructs. For example, for storeOfVectorConstantIsCheap, we can have a test that .ll code that stores a vector value to memory will generate a single vector store rather than n scalar stores. Searching for the usages of each function in llvm code might help I think.
lib/Target/WebAssembly/WebAssemblyISelLowering.cpp | ||
---|---|---|
526 | The explanation of this function says:
I'm not 100% sure what this means, but to me this sounds like, if you want to insert a single element to an undef vector, it is better to just do splat then inserting a single element.
And while investigating current behaviors related to this, I filed a bug. I might be mistaken, so please let me know then. | |
529 | Maybe it's better to state that wasm SIMD shift instruction only takes scalar shift amounts, so if it's not a scalar we need an expensive sequence of code. |
While shuffles are quite large, the alternative is to store each element to the stack, one at a time, and then load them back as a vector. This will often be larger than the corresponding shuffle sequence. And it'll very likely be slower.