[PATCH] D83303: [SelectionDAG] Fix incorrect offset when expanding CONCAT_VECTORS.
Cameron McInally via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 7 07:57:28 PDT 2020
cameron.mcinally accepted this revision.
cameron.mcinally added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1429
+ PtrInfo.getWithOffset(Offset), MemVT));
+ else
Stores.push_back(DAG.getStore(DAG.getEntryNode(), dl, Node->getOperand(i),
----------------
Nit: Not specific to this patch, but I think we can hoist `Node->getOperand(i).getValueType()` out of the loop. All the BUILD_VECTOR/CONCAT_VECTOR operand types should be the same.
Looking deeper, the BUILD_VECTOR description is a little vague though:
```
/// The types of the operands must all be
/// the same and must match the vector element type, except that integer types
/// are allowed to be larger than the element type, in which case the operands
/// are implicitly truncated.
```
I assume the larger integer operand types must all be the same type. Maybe I'm misinterpreting this though.
Just queried llvm-dev about BUILD_VECTOR and will report back...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83303/new/
https://reviews.llvm.org/D83303
More information about the llvm-commits
mailing list