1 ; Test that strcmp won't be converted to CLST if calls are
2 ; marked with nobuiltin, eg. for sanitizers.
4 ; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
6 declare signext i32 @strcmp(ptr %src1, ptr %src2)
8 ; Check a case where the result is used as an integer.
9 define i32 @f1(ptr %src1, ptr %src2) {
12 ; CHECK: brasl %r14, strcmp
14 %res = call i32 @strcmp(ptr %src1, ptr %src2) nobuiltin
18 ; Check a case where the result is tested for equality.
19 define void @f2(ptr %src1, ptr %src2, ptr %dest) {
22 ; CHECK: brasl %r14, strcmp
24 %res = call i32 @strcmp(ptr %src1, ptr %src2) nobuiltin
25 %cmp = icmp eq i32 %res, 0
26 br i1 %cmp, label %exit, label %store
29 store i32 0, ptr %dest
36 ; Test a case where the result is used both as an integer and for
38 define i32 @f3(ptr %src1, ptr %src2, ptr %dest) {
41 ; CHECK: brasl %r14, strcmp
44 %res = call i32 @strcmp(ptr %src1, ptr %src2) nobuiltin
45 %cmp = icmp slt i32 %res, 0
46 br i1 %cmp, label %exit, label %store
49 store i32 0, ptr %dest