[llvm] [DAG] computeKnownFPClass - add ISD::SPLAT_VECTOR handling (PR #189780)

Kartik Ohlan via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 1 09:59:51 PDT 2026


Ko496-glitch wrote:

> Please regenerate the tests after #189944 (get rid of any that don't use splat_vector) - yoiu might find it more convenient to just add the riscv tests to combine-is_fpclass.ll

thanks for the review  so for the proper test for splat-vector in RISCV, do suggest something like this ? use of shufftle and insertelement ? 

define <vscale x 4 x i1> @splat_constant_is_pos_normal() {
  %ins   = insertelement <vscale x 4 x float> poison, float 1.0, i64 0
  %splat = shufflevector <vscale x 4 x float> %ins, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
  %res   = call <vscale x 4 x i1> @llvm.is.fpclass.nxv4f32(<vscale x 4 x float> %splat, i32 128) ; 128 = pos_normal
  ret <vscale x 4 x i1> %res
}


https://github.com/llvm/llvm-project/pull/189780


More information about the llvm-commits mailing list