[PATCH] D94142: [IR] Allow scalable vectors in structs to support intrinsics returning multiple values.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 5 17:51:01 PST 2021


craig.topper created this revision.
craig.topper added reviewers: efriedma, c-rhodes, sdesmalen, kmclaughlin, HsiangKai.
Herald added subscribers: dexonsmith, luismarques, s.egerton, lenary, PkmX, simoncook, hiraditya.
craig.topper requested review of this revision.
Herald added a project: LLVM.

RISC-V would like to use a struct of scalable vectors to return multiple
values from intrinsics. This woud also be needed for target independent
intrinsics like llvm.sadd.overflow.

This patch removes the existing restriction for this. I've modified
StructType::isSized to consider a struct containing scalable vectors
as unsized so the verifier won't allow loads/stores/allocas of these
structs.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D94142

Files:
  llvm/include/llvm/IR/DerivedTypes.h
  llvm/lib/IR/Type.cpp
  llvm/lib/IR/Verifier.cpp
  llvm/test/Other/scalable-vector-struct-intrinsic.ll
  llvm/test/Other/scalable-vector-struct.ll
  llvm/test/Verifier/scalable-global-vars.ll
  llvm/test/Verifier/scalable-vector-struct-alloca.ll
  llvm/test/Verifier/scalable-vector-struct-load.ll
  llvm/test/Verifier/scalable-vector-struct-store.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94142.314761.patch
Type: text/x-patch
Size: 7190 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210106/bb0da107/attachment.bin>


More information about the llvm-commits mailing list