The masked compressstore can not be replaced with normal masked store.
Because masked compressstore required adjacently store the masked elements
which normal masked store can not make sure.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
---|---|---|
11033–11034 | Do you mean cannot be a compress store? |
llvm/test/CodeGen/X86/masked_compressstore_isel.ll | ||
---|---|---|
15–17 | Can we optimizate it to truncated compressstore? |
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
---|---|---|
11033–11034 | Yes, right | |
llvm/test/CodeGen/X86/masked_compressstore_isel.ll | ||
15–17 | Do we have truncated compressstore? |
llvm/test/CodeGen/X86/masked_compressstore_isel.ll | ||
---|---|---|
15–17 | I think the truncated xxx is just a code concept, it actually means turning the trunction from value to the mask. |
llvm/test/CodeGen/X86/masked_compressstore_isel.ll | ||
---|---|---|
15–17 | Can we first let it in and then try do the optimization ? |
LGTM.
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
---|---|---|
11033–11034 | Don't forget update the comments. | |
llvm/test/CodeGen/X86/masked_compressstore_isel.ll | ||
15–17 | Sure. Better add a TODO in comments. |
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
---|---|---|
11033–11034 | I meant the comment We can do this even if this is already a masked truncstore or a compress store is wrong. I'd expect it would be: // If this is a TRUNC followed by a masked store, fold this into a masked // truncating store. We can do this even if this is already a masked // truncstore. // If this is a TRUNC followed by a compress store, we don't do the combine. // TODO: Try combine to masked compress store if possiable. |
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
---|---|---|
11033–11034 | Good catch! Done in 7557d94bd8d92e486084074e1017eb33149f9156 , thanks again! |
Do you mean cannot be a compress store?