• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; Test the GPR constraint "r".
2;
3; RUN: llc < %s -mtriple=s390x-linux-gnu -no-integrated-as | FileCheck %s
4
5define i64 @f1() {
6; CHECK-LABEL: f1:
7; CHECK: lhi %r0, 1
8; CHECK: blah %r2 %r0
9; CHECK: br %r14
10  %val = call i64 asm "blah $0 $1", "=r,r" (i8 1)
11  ret i64 %val
12}
13
14define i64 @f2() {
15; CHECK-LABEL: f2:
16; CHECK: lhi %r0, 2
17; CHECK: blah %r2 %r0
18; CHECK: br %r14
19  %val = call i64 asm "blah $0 $1", "=r,r" (i16 2)
20  ret i64 %val
21}
22
23define i64 @f3() {
24; CHECK-LABEL: f3:
25; CHECK: lhi %r0, 3
26; CHECK: blah %r2 %r0
27; CHECK: br %r14
28  %val = call i64 asm "blah $0 $1", "=r,r" (i32 3)
29  ret i64 %val
30}
31
32define i64 @f4() {
33; CHECK-LABEL: f4:
34; CHECK: lghi %r0, 4
35; CHECK: blah %r2 %r0
36; CHECK: br %r14
37  %val = call i64 asm "blah $0 $1", "=r,r" (i64 4)
38  ret i64 %val
39}
40