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 ptr@strcpy(ptr %dest, ptr %src)
7 declare ptr@stpcpy(ptr %dest, ptr %src)
10 define ptr@f1(ptr %dest, ptr %src) {
13 ; CHECK: brasl %r14, strcpy
15 %res = call ptr@strcpy(ptr %dest, ptr %src) nobuiltin
20 define ptr@f2(ptr %dest, ptr %src) {
23 ; CHECK: brasl %r14, stpcpy
25 %res = call ptr@stpcpy(ptr %dest, ptr %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, ptr %dest, ptr %src, ptr %resptr, ptr %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, ptr %resptr
39 %unused = call ptr@strcpy(ptr %dest, ptr %src) nobuiltin
40 store i32 0, ptr %storeptr