[all-commits] [llvm/llvm-project] cfec6c: [IR] Allow scalable vectors in structs to support ...

Craig Topper via All-commits all-commits at lists.llvm.org
Sun Jan 17 23:46:29 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cfec6cd50c36f3db2fcd4084a8ef4df834a4eb24
      https://github.com/llvm/llvm-project/commit/cfec6cd50c36f3db2fcd4084a8ef4df834a4eb24
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2021-01-17 (Sun, 17 Jan 2021)

  Changed paths:
    M llvm/docs/LangRef.rst
    M llvm/include/llvm/IR/DerivedTypes.h
    M llvm/lib/CodeGen/Analysis.cpp
    M llvm/lib/IR/DataLayout.cpp
    M llvm/lib/IR/Type.cpp
    M llvm/lib/IR/Verifier.cpp
    A llvm/test/CodeGen/RISCV/scalable-vector-struct.ll
    A llvm/test/Other/scalable-vector-struct-intrinsic.ll
    R llvm/test/Other/scalable-vector-struct.ll
    M llvm/test/Verifier/scalable-global-vars.ll
    A llvm/test/Verifier/scalable-vector-struct-alloca.ll
    A llvm/test/Verifier/scalable-vector-struct-load.ll
    A llvm/test/Verifier/scalable-vector-struct-store.ll

  Log Message:
  -----------
  [IR] Allow scalable vectors in structs to support intrinsics returning multiple values.

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.

Reviewed By: sdesmalen

Differential Revision: https://reviews.llvm.org/D94142




More information about the All-commits mailing list