File: vec-args-02.ll

package info (click to toggle)
llvm-toolchain-9 1%3A9.0.1-16.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 882,388 kB
  • sloc: cpp: 4,167,636; ansic: 714,256; asm: 457,610; python: 155,927; objc: 65,094; sh: 42,856; lisp: 26,908; perl: 7,786; pascal: 7,722; makefile: 6,881; ml: 5,581; awk: 3,648; cs: 2,027; xml: 888; javascript: 381; ruby: 156
file content (31 lines) | stat: -rw-r--r-- 1,150 bytes parent folder | download | duplicates (23)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
; Test the handling of unnamed vector arguments.
;
; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s -check-prefix=CHECK-VEC
; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s -check-prefix=CHECK-STACK

; This routine is called with two named vector argument (passed
; in %v24 and %v26) and two unnamed vector arguments (passed
; in the double-wide stack slots at 160 and 176).
declare void @bar(<4 x i32>, <4 x i32>, ...)

define void @foo() {
; CHECK-VEC-LABEL: foo:
; CHECK-VEC-DAG: vrepif %v24, 1
; CHECK-VEC-DAG: vrepif %v26, 2
; CHECK-VEC: brasl %r14, bar@PLT
;
; CHECK-STACK-LABEL: foo:
; CHECK-STACK: aghi %r15, -192
; CHECK-STACK-DAG: vrepif [[REG1:%v[0-9]+]], 3
; CHECK-STACK-DAG: vst [[REG1]], 160(%r15)
; CHECK-STACK-DAG: vrepif [[REG2:%v[0-9]+]], 4
; CHECK-STACK-DAG: vst [[REG2]], 176(%r15)
; CHECK-STACK: brasl %r14, bar@PLT

  call void (<4 x i32>, <4 x i32>, ...) @bar
              (<4 x i32> <i32 1, i32 1, i32 1, i32 1>,
               <4 x i32> <i32 2, i32 2, i32 2, i32 2>,
               <4 x i32> <i32 3, i32 3, i32 3, i32 3>,
               <4 x i32> <i32 4, i32 4, i32 4, i32 4>)
  ret void
}