1; Test that strlen/strnlen won't be converted to SRST if calls are
2; marked with nobuiltin, eg. for sanitizers.
3;
4; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
5
6declare i64 @strlen(i8 *%src)
7declare i64 @strnlen(i8 *%src, i64 %len)
8
9define i64 @f1(i32 %dummy, i8 *%src) {
10; CHECK-LABEL: f1:
11; CHECK: brasl %r14, strlen
12; CHECK: br %r14
13  %res = call i64 @strlen(i8 *%src) nobuiltin
14  ret i64 %res
15}
16
17; Likewise for strnlen.
18define i64 @f2(i64 %len, i8 *%src) {
19; CHECK-LABEL: f2:
20; CHECK-NOT: srst
21; CHECK: brasl %r14, strnlen
22; CHECK: br %r14
23  %res = call i64 @strnlen(i8 *%src, i64 %len) nobuiltin
24  ret i64 %res
25}
26