xref: /llvm-project/llvm/test/CodeGen/SystemZ/memchr-nobuiltin.ll (revision a1710eb3cd5823c5d14899112ca3086acbdbe9cb)
1; Test that memchr 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 ptr@memchr(ptr %src, i16 %char, i32 %len)
7
8; Test a simple forwarded call.
9define ptr@f1(ptr %src, i16 %char, i32 %len) {
10; CHECK-LABEL: f1:
11; CHECK-NOT: srst
12; CHECK: brasl %r14, memchr
13; CHECK: br %r14
14  %res = call ptr@memchr(ptr %src, i16 %char, i32 %len) nobuiltin
15  ret ptr %res
16}
17