brintos

brintos / llvm-project-archived public Read only

0
0
Text · 847 B · 19d9caa Raw
25 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -mtriple=riscv32 -mattr=+v -verify-machineinstrs < %s | FileCheck %s3 4; This demonstrates that we can pass a struct containing scalable vectors across5; a basic block.6 7define i32 @foo({ {<vscale x 2 x i32>, <vscale x 2 x i32>}, i32 } %x, ptr %y, ptr %z) {8; CHECK-LABEL: foo:9; CHECK:       # %bb.0: # %entry10; CHECK-NEXT:    vs1r.v v8, (a1)11; CHECK-NEXT:    vs1r.v v9, (a2)12; CHECK-NEXT:    ret13entry:14  br label %return15 16return:17  %a = extractvalue { {<vscale x 2 x i32>, <vscale x 2 x i32>}, i32 } %x, 118  %b = extractvalue { {<vscale x 2 x i32>, <vscale x 2 x i32>}, i32 } %x, 0, 019  %c = extractvalue { {<vscale x 2 x i32>, <vscale x 2 x i32>}, i32 } %x, 0, 120  store <vscale x 2 x i32> %b, ptr %y21  store <vscale x 2 x i32> %c, ptr %z22 23  ret i32 %a24}25