[PATCH] D98169: [IR] Permit load/store/alloca for struct with the same scalable vectors.

Hsiangkai Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 8 04:23:04 PST 2021


HsiangKai created this revision.
HsiangKai added a reviewer: craig.topper.
Herald added subscribers: StephenFan, frasercrmck, dexonsmith, luismarques, apazos, sameer.abuasal, s.egerton, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya.
HsiangKai requested review of this revision.
Herald added subscribers: llvm-commits, MaskRay.
Herald added a project: LLVM.

In this patch, it permits load/store/alloca struct with all the same
scalable vectors. We use TypeSize to represent the size of struct and
use StackOffset to represent the element offsets within the struct.
TypeSize only has one dimension, either Fixed or Scalable. That is why
we could not mix scalar and scalable vector within the struct.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D98169

Files:
  llvm/include/llvm/IR/DataLayout.h
  llvm/include/llvm/IR/Type.h
  llvm/include/llvm/Support/TypeSize.h
  llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  llvm/lib/IR/DataLayout.cpp
  llvm/lib/IR/Type.cpp
  llvm/test/CodeGen/RISCV/rvv/load-store-scalable-struct.ll
  llvm/test/Other/load-scalable-vector-struct.ll
  llvm/test/Other/store-scalable-vector-struct.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98169.328971.patch
Type: text/x-patch
Size: 15794 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210308/ff0ba990/attachment.bin>


More information about the llvm-commits mailing list