Allow stores of bitcastable types to be merged by peeking through BITCAST nodes and recasting stored values constant and vector extract nodes as necessary.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Ignore this last patch. It should have gone to another diff. Will overwrite with correct version presently.
| lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
|---|---|---|
| 12523 ↗ | (On Diff #105494) | It'd probably be better if you avoid the ternary inside the if(). if (MemVT.isInteger() && !MemVT.bitsEq(Other->getMemoryVT())) return false; if (!MemVT.isInteger() && Other->getMemoryVT() != MemVT) return false; or if ((MemVT.isInteger() && !MemVT.bitsEq(Other->getMemoryVT())) ||
(!MemVT.isInteger() && Other->getMemoryVT() != MemVT))
return false;That or pull it out as a bool variable in the line above. |
| 12536 ↗ | (On Diff #105494) | Another ternary inside an if() |
Comment Actions
Cleanup the mergestore helper function casting and add missing extract_subvector casting logic.
| lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
|---|---|---|
| 484 ↗ | (On Diff #109261) | A lot of these comment changes look like NFCs that can go in separately. |
| 12476 ↗ | (On Diff #109261) | Please can you create a static helper that performs this? We have a lot of peek through bitcasts in this patch alone.... |
| 12478 ↗ | (On Diff #109261) | Val.getValueSizeInBits() |
| 12514 ↗ | (On Diff #109261) | Merge these ifs() to reduce indentation? if (MemVT != Val.getValueType() &&
(Val.getOpcode() == ISD::EXTRACT_VECTOR_ELT ||
Val.getOpcode() == ISD::EXTRACT_SUBVECTOR) { |