1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
3 ; RUN: -mcpu=pwr9 < %s | FileCheck %s --check-prefix=CHECK-64
4 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
5 ; RUN: -mcpu=pwr9 < %s | FileCheck %s --check-prefix=CHECK-64
6 ; RUN: llc -verify-machineinstrs -mtriple=powerpc-unknown-aix \
7 ; RUN: -mcpu=pwr9 < %s | FileCheck %s --check-prefix=CHECK-32
8 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-aix \
9 ; RUN: -mcpu=pwr9 < %s | FileCheck %s --check-prefix=CHECK-64
11 define dso_local signext i32 @test_builtin_ppc_cmprb(i32 %a, i32%b, i32 %c, i32%d) {
12 ; CHECK-32-LABEL: test_builtin_ppc_cmprb:
13 ; CHECK-32: # %bb.0: # %entry
14 ; CHECK-32-NEXT: cmprb 0, 0, 3, 4
15 ; CHECK-32-NEXT: setb 3, 0
16 ; CHECK-32-NEXT: cmprb 0, 1, 5, 6
17 ; CHECK-32-NEXT: setb 4, 0
18 ; CHECK-32-NEXT: add 3, 3, 4
21 ; CHECK-64-LABEL: test_builtin_ppc_cmprb:
22 ; CHECK-64: # %bb.0: # %entry
23 ; CHECK-64-NEXT: cmprb 0, 0, 3, 4
24 ; CHECK-64-NEXT: setb 3, 0
25 ; CHECK-64-NEXT: cmprb 0, 1, 5, 6
26 ; CHECK-64-NEXT: setb 4, 0
27 ; CHECK-64-NEXT: add 3, 3, 4
28 ; CHECK-64-NEXT: extsw 3, 3
31 %0 = call i32 @llvm.ppc.cmprb(i32 0, i32 %a, i32 %b)
32 %1 = call i32 @llvm.ppc.cmprb(i32 1, i32 %c, i32 %d)
33 %add = add nsw i32 %0, %1
37 declare i32 @llvm.ppc.cmprb(i32, i32, i32)