[llvm] XCore: Add test for sincos and exp10 intrinsics (PR #148621)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 14 06:09:26 PDT 2025
================
@@ -0,0 +1,71 @@
+; RUN: llc -mtriple=xcore-unknown-unknown < %s | FileCheck %s
+; RUN: llc -mtriple=xcore-none-linux < %s | FileCheck %s
+; RUN: llc -mtriple=xcore-none-linux-gnu < %s | FileCheck %s
+
+; CHECK-LABEL: exp10_f16:
+; CHECK: bl __extendhfsf2
+; CHECK: bl exp10f
+; CHECK: bl __truncsfhf2
+define half @exp10_f16(half %x) #0 {
+ %r = call half @llvm.exp10.f16(half %x)
+ ret half %r
+}
+
+; CHECK-LABEL: exp10_v2f16:
+; CHECK: bl __extendhfsf2
+; CHECK: bl __extendhfsf2
+; CHECK: bl exp10f
+; CHECK: bl exp10f
+; CHECK: bl __truncsfhf2
+; CHECK: bl __truncsfhf2
+define <2 x half> @exp10_v2f16(<2 x half> %x) #0 {
+ %r = call <2 x half> @llvm.exp10.v2f16(<2 x half> %x)
+ ret <2 x half> %r
+}
+
+; CHECK-LABEL: exp10_f32:
+; CHECK: bl exp10f
+define float @exp10_f32(float %x) #0 {
+ %r = call float @llvm.exp10.f32(float %x)
+ ret float %r
+}
+
+; CHECK-LABEL: exp10_v2f32:
+; CHECK: bl exp10f
+; CHECK: bl exp10f
+define <2 x float> @exp10_v2f32(<2 x float> %x) #0 {
+ %r = call <2 x float> @llvm.exp10.v2f32(<2 x float> %x)
+ ret <2 x float> %r
----------------
arsenm wrote:
The IR is the IR, every backend is supposed to support ~every operation. All operations should have test coverage on all types. Backends crashing on some type isn't OK
https://github.com/llvm/llvm-project/pull/148621
More information about the llvm-commits
mailing list