[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 12:03:28 PDT 2020


cameron.mcinally marked an inline comment as done.
cameron.mcinally added inline comments.


================
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),
----------------
cameron.mcinally wrote:
> 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...
> 
It seems that the operands must always have the same type, but there's a modicum of disagreement (uncertainty?) there. No reason to hold up this patch though.


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