[llvm] [X86][GlobalIsel] Add ceil/trunc/floor cpp intrinsic test (PR #156281)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 31 23:43:45 PDT 2025
================
@@ -0,0 +1,105 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+; RUN: llc < %s -mtriple=x86_64-linux-gnu | FileCheck %s --check-prefixes=X64,DAG-X64
+; RUN: llc < %s -mtriple=x86_64-linux-gnu -fast-isel | FileCheck %s --check-prefixes=X64,FASTISEL-X64
+; RUN: llc < %s -mtriple=i686-linux-gnu | FileCheck %s --check-prefixes=X86
+; RUN: llc < %s -mtriple=i686-linux-gnu -fast-isel | FileCheck %s --check-prefixes=X86
+; RUN: llc < %s -mtriple=x86_64-linux-gnu -global-isel -global-isel-abort=2 | FileCheck %s --check-prefixes=GISEL-X64
+; RUN: llc < %s -mtriple=i686-linux-gnu -global-isel -global-isel-abort=2 | FileCheck %s --check-prefixes=X86,GISEL-X86
+
+define float @floor_f32(float %a) nounwind readnone {
+; DAG-X64-LABEL: floor_f32:
+; DAG-X64: # %bb.0:
+; DAG-X64-NEXT: jmp floorf at PLT # TAILCALL
+;
+; FASTISEL-X64-LABEL: floor_f32:
+; FASTISEL-X64: # %bb.0:
+; FASTISEL-X64-NEXT: pushq %rax
+; FASTISEL-X64-NEXT: callq floorf at PLT
+; FASTISEL-X64-NEXT: popq %rax
+; FASTISEL-X64-NEXT: retq
+;
+; GISEL-X64-LABEL: floor_f32:
----------------
mahesh-attarde wrote:
done.
https://github.com/llvm/llvm-project/pull/156281
More information about the llvm-commits
mailing list