1 ; Test use of RISBG vs RISBGN on zEC12.
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=zEC12 | FileCheck %s
5 ; On zEC12, we generally prefer RISBGN.
6 define i64 @f1(i64 %a, i64 %b) {
8 ; CHECK: risbgn %r2, %r3, 60, 62, 0
10 %anda = and i64 %a, -15
11 %andb = and i64 %b, 14
12 %or = or i64 %anda, %andb
16 ; But we may fall back to RISBG if we can use the condition code.
17 define i64 @f2(i64 %a, i64 %b, i32* %c) {
19 ; CHECK: risbg %r2, %r3, 60, 62, 0
22 %anda = and i64 %a, -15
23 %andb = and i64 %b, 14
24 %or = or i64 %anda, %andb
25 %cmp = icmp sgt i64 %or, 0
26 %conv = zext i1 %cmp to i32
27 store i32 %conv, i32* %c, align 4