Home | History | Annotate | Download | only in SystemZ
      1 ; Test memchr using SRST, with a weird but usable prototype.
      2 ;
      3 ; RUN: llc < %s -mtriple=s390x-linux-gnu -verify-machineinstrs | FileCheck %s
      4 
      5 declare i8 *@memchr(i8 *%src, i16 %char, i32 %len)
      6 
      7 ; Test a simple forwarded call.
      8 define i8 *@f1(i8 *%src, i16 %char, i32 %len) {
      9 ; CHECK-LABEL: f1:
     10 ; CHECK-DAG: lgr [[REG:%r[1-5]]], %r2
     11 ; CHECK-DAG: algfr %r2, %r4
     12 ; CHECK-DAG: llcr %r0, %r3
     13 ; CHECK: [[LABEL:\.[^:]*]]:
     14 ; CHECK: srst %r2, [[REG]]
     15 ; CHECK-NEXT: jo [[LABEL]]
     16 ; CHECK: jl {{\.L.*}}
     17 ; CHECK: lghi %r2, 0
     18 ; CHECK: br %r14
     19   %res = call i8 *@memchr(i8 *%src, i16 %char, i32 %len)
     20   ret i8 *%res
     21 }
     22