Files
llvm-project/llvm/test/CodeGen/PowerPC/ppc_test_data_class.ll
zhijian lin ce2a9cbf15 [PowerPC] Fix inefficient code for __builtin_ppc_test_data_class (#181420)
emit a more efficient asm for  llvm.ppc.test.data.class.f64
2026-02-23 10:44:38 -05:00

31 lines
1.5 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
; RUN: llc -mtriple=powerpc-ibm-aix-xcoff -mcpu=pwr9 -ppc-asm-full-reg-names < %s | FileCheck --check-prefix=PWR9 %s
; RUN: llc -mtriple=powerpc-ibm-aixi-xcoff -mcpu=pwr10 -ppc-asm-full-reg-names < %s | FileCheck --check-prefix=PWR10 %s
; RUN: llc -mtriple=powerpc64-ibm-aix-xcoff -mcpu=pwr9 -ppc-asm-full-reg-names < %s | FileCheck --check-prefix=PWR9 %s
; RUN: llc -mtriple=powerpc64-ibm-aix-xcoff -mcpu=pwr10 -ppc-asm-full-reg-names < %s | FileCheck --check-prefix=PWR10 %s
; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr9 -ppc-asm-full-reg-names < %s | FileCheck --check-prefix=PWR9 %s
; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr10 -ppc-asm-full-reg-names < %s | FileCheck --check-prefix=PWR10 %s
define noundef zeroext i1 @_Z16ossIsValidDoubled(double noundef %in) local_unnamed_addr {
; PWR9-LABEL: _Z16ossIsValidDoubled:
; PWR9: # %bb.0: # %entry
; PWR9-NEXT: xststdcdp cr0, f1, 115
; PWR9-NEXT: li r3, 1
; PWR9-NEXT: iseleq r3, 0, r3
; PWR9-NEXT: blr
;
; PWR10-LABEL: _Z16ossIsValidDoubled:
; PWR10: # %bb.0: # %entry
; PWR10-NEXT: xststdcdp cr0, f1, 115
; PWR10-NEXT: setbc r3, eq
; PWR10-NEXT: xori r3, r3, 1
; PWR10-NEXT: blr
entry:
%test_data_class = tail call i32 @llvm.ppc.test.data.class.f64(double %in, i32 115)
%tobool.not = icmp eq i32 %test_data_class, 0
ret i1 %tobool.not
}
declare i32 @llvm.ppc.test.data.class.f64(double, i32 immarg)