xref: /llvm-project/llvm/test/CodeGen/PowerPC/builtins-ppc-xlcompat-compare-64bit-only.ll (revision 18c19414eb70578d4c487d6f4b0f438aead71d6a)
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
4; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
5; RUN:   -mcpu=pwr9 < %s | FileCheck %s
6; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-aix \
7; RUN:   -mcpu=pwr9 < %s | FileCheck %s
8
9define dso_local i64 @test_builtin_ppc_cmpeqb(i64 %a, i64 %b) {
10; CHECK-LABEL: test_builtin_ppc_cmpeqb:
11; CHECK:       # %bb.0: # %entry
12; CHECK-NEXT:    cmpeqb 0, 3, 4
13; CHECK-NEXT:    setb 3, 0
14; CHECK-NEXT:    blr
15entry:
16  %0 = call i64 @llvm.ppc.cmpeqb(i64 %a, i64 %b)
17  ret i64 %0
18}
19
20declare i64 @llvm.ppc.cmpeqb(i64, i64)
21
22define dso_local i64 @test_builtin_ppc_setb(i64 %a, i64 %b) {
23; CHECK-LABEL: test_builtin_ppc_setb:
24; CHECK:       # %bb.0: # %entry
25; CHECK-NEXT:    cmpd 3, 4
26; CHECK-NEXT:    setb 3, 0
27; CHECK-NEXT:    blr
28entry:
29  %0 = call i64 @llvm.ppc.setb(i64 %a, i64 %b)
30  ret i64 %0
31}
32
33declare i64 @llvm.ppc.setb(i64, i64)
34