[llvm] [DAG] computeKnownFPClass - add ISD::SPLAT_VECTOR handling (PR #189780)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 2 04:46:17 PDT 2026
================
@@ -0,0 +1,33 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -mtriple=aarch64 -mattr=+sve < %s | FileCheck %s
+
+define <vscale x 4 x i1> @test_splat_const_is_pos_normal() {
+; CHECK-LABEL: test_splat_const_is_pos_normal:
+; CHECK: // %bb.0:
+; CHECK-NEXT: fmov z0.s, #1.00000000
+; CHECK-NEXT: mov z1.s, #0x7fffff
+; CHECK-NEXT: ptrue p0.s
+; CHECK-NEXT: sub z0.s, z0.s, #1 // =0x1
+; CHECK-NEXT: cmphi p0.s, p0/z, z1.s, z0.s
+; CHECK-NEXT: ret
+ %res = call <vscale x 4 x i1> @llvm.is.fpclass.nxv4f32(<vscale x 4 x float> splat (float 1.0), i32 128)
+ ret <vscale x 4 x i1> %res
+}
+
+define <vscale x 4 x i1> @test_splat_const_isinf() {
+; CHECK-LABEL: test_splat_const_isinf:
+; CHECK: // %bb.0:
+; CHECK-NEXT: ptrue p0.s
----------------
arsenm wrote:
Ideally this would test some transform that happens, not the degenerate case that constant folds
https://github.com/llvm/llvm-project/pull/189780
More information about the llvm-commits
mailing list