1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
4 declare signext i32 @bcmp(ptr nocapture, ptr nocapture, i64)
6 define zeroext i1 @test_bcmp_eq_0(ptr nocapture readonly %A, ptr nocapture readonly %B) {
7 ; CHECK-LABEL: test_bcmp_eq_0:
9 ; CHECK-NEXT: clc 0(2,%r3), 0(%r2)
11 ; CHECK-NEXT: afi %r0, -268435456
12 ; CHECK-NEXT: risbg %r2, %r0, 63, 191, 33
14 %c = tail call signext i32 @bcmp(ptr %A, ptr %B, i64 2)
15 %res = icmp eq i32 %c, 0
19 define signext i32 @test_bcmp(ptr nocapture readonly %A, ptr nocapture readonly %B) {
20 ; CHECK-LABEL: test_bcmp:
22 ; CHECK-NEXT: clc 0(2,%r3), 0(%r2)
24 ; CHECK-NEXT: sllg %r0, %r0, 34
25 ; CHECK-NEXT: srag %r2, %r0, 62
27 %res = tail call signext i32 @bcmp(ptr %A, ptr %B, i64 2)