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(i8 *%src1, i8 *%src2)
8 ; Check a case where the result is used as an integer.
9 define i32 @f1(i8 *%src1, i8 *%src2) {
12 ; CHECK: brasl %r14, strcmp
14 %res = call i32 @strcmp(i8 *%src1, i8 *%src2) nobuiltin
18 ; Check a case where the result is tested for equality.
19 define void @f2(i8 *%src1, i8 *%src2, i32 *%dest) {
22 ; CHECK: brasl %r14, strcmp
24 %res = call i32 @strcmp(i8 *%src1, i8 *%src2) nobuiltin
25 %cmp = icmp eq i32 %res, 0
26 br i1 %cmp, label %exit, label %store
29 store i32 0, i32 *%dest
36 ; Test a case where the result is used both as an integer and for
38 define i32 @f3(i8 *%src1, i8 *%src2, i32 *%dest) {
41 ; CHECK: brasl %r14, strcmp
44 %res = call i32 @strcmp(i8 *%src1, i8 *%src2) nobuiltin
45 %cmp = icmp slt i32 %res, 0
46 br i1 %cmp, label %exit, label %store
49 store i32 0, i32 *%dest