1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 12:43:36 +01:00
llvm-mirror/test/CodeGen/PowerPC/builtins-ppc-xlcompat-compare-64bit-only.ll
Victor Huang 6d07c374d0 [PowerPC] Add PowerPC compare and multiply related builtins and instrinsics for XL compatibility
This patch is in a series of patches to provide builtins for compatibility
with the XL compiler. This patch adds the builtins and instrisics for compare
and multiply related operations.

Reviewed By: nemanjai, #powerpc

Differential revision: https://reviews.llvm.org/D102875
2021-07-13 16:55:09 -05:00

34 lines
1.0 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
; RUN: -mcpu=pwr9 < %s | FileCheck %s
; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu \
; RUN: -mcpu=pwr9 < %s | FileCheck %s
; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-aix \
; RUN: -mcpu=pwr9 < %s | FileCheck %s
define dso_local i64 @test_builtin_ppc_cmpeqb(i64 %a, i64 %b) {
; CHECK-LABEL: test_builtin_ppc_cmpeqb:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: cmpeqb 0, 3, 4
; CHECK-NEXT: setb 3, 0
; CHECK-NEXT: blr
entry:
%0 = call i64 @llvm.ppc.cmpeqb(i64 %a, i64 %b)
ret i64 %0
}
declare i64 @llvm.ppc.cmpeqb(i64, i64)
define dso_local i64 @test_builtin_ppc_setb(i64 %a, i64 %b) {
; CHECK-LABEL: test_builtin_ppc_setb:
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: cmpd 3, 4
; CHECK-NEXT: setb 3, 0
; CHECK-NEXT: blr
entry:
%0 = call i64 @llvm.ppc.setb(i64 %a, i64 %b)
ret i64 %0
}
declare i64 @llvm.ppc.setb(i64, i64)