1 ; Test that strcmp won't be converted to MVST if calls are
2 ; marked with nobuiltin, eg. for sanitizers.
4 ; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
6 declare i8 *@strcpy(i8 *%dest, i8 *%src)
7 declare i8 *@stpcpy(i8 *%dest, i8 *%src)
10 define i8 *@f1(i8 *%dest, i8 *%src) {
13 ; CHECK: brasl %r14, strcpy
15 %res = call i8 *@strcpy(i8 *%dest, i8 *%src) nobuiltin
20 define i8 *@f2(i8 *%dest, i8 *%src) {
23 ; CHECK: brasl %r14, stpcpy
25 %res = call i8 *@stpcpy(i8 *%dest, i8 *%src) nobuiltin
29 ; Check correct operation with other loads and stores. The load must
30 ; come before the loop and the store afterwards.
31 define i32 @f3(i32 %dummy, i8 *%dest, i8 *%src, i32 *%resptr, i32 *%storeptr) {
33 ; CHECK-DAG: l [[REG1:%r[0-9]+]], 0(%r5)
35 ; CHECK: brasl %r14, strcpy
36 ; CHECK: mvhi 0(%r6), 0
38 %res = load i32, i32 *%resptr
39 %unused = call i8 *@strcpy(i8 *%dest, i8 *%src) nobuiltin
40 store i32 0, i32 *%storeptr