[PATCH] D156349: [DAG] Support store merging of vector constant stores
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 2 09:55:04 PDT 2023
reames added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:702
+ case ISD::BUILD_VECTOR:
+ if (ISD::isBuildVectorOfConstantSDNodes(StoreVal.getNode()) ||
+ ISD::isBuildVectorOfConstantFPSDNodes(StoreVal.getNode()))
----------------
craig.topper wrote:
> I believe this function allows undef elements. Does that case work ok?
Seems to. I added x86 coverage for these cases, and got reasonable results.
It does seem like maybe we should be consistent in allowing scalar undefs in our constant determination, but that looks like a bigger change as we have to add Undef to the lattice when merging. I guess I could start with always considering undef constant - which is basically what this change does - but either option feels like it should be a separate change.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156349/new/
https://reviews.llvm.org/D156349
More information about the llvm-commits
mailing list