mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
4097ff94d8
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
10 lines
416 B
LLVM
10 lines
416 B
LLVM
; RUN: not opt -S -verify < %s 2>&1 | FileCheck %s
|
|
|
|
define void @store({ i32, <vscale x 1 x i32> }* %x, i32 %y, <vscale x 1 x i32> %z) {
|
|
; CHECK: error: storing unsized types is not allowed
|
|
%a = insertvalue { i32, <vscale x 1 x i32> } undef, i32 %y, 0
|
|
%b = insertvalue { i32, <vscale x 1 x i32> } %a, <vscale x 1 x i32> %z, 1
|
|
store { i32, <vscale x 1 x i32> } %b, { i32, <vscale x 1 x i32> }* %x
|
|
ret void
|
|
}
|