[llvm] [DAG] computeKnownFPClass - add ISD::EXTRACT_VECTOR_ELT handling (PR #190307)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 17 07:06:50 PDT 2026
================
@@ -22,6 +22,88 @@ define i8 @iszero_constant_v4f32() nounwind {
ret i8 %r
}
+define i1 @extract_idx0_const_vec_isnan() nounwind { ; vec = <QNaN, 2.0, +Inf, -Inf>, idx=0, isnan -> true
----------------
RKSimon wrote:
None of these tests will work properly as they will constant fold the constant vector away - you need to use a non-constant vector with known fpclass characteristics (preferably different per element).
You might be able to use the bitcast known bits handling that was added in #188606 to do this for you.
You will also need an additional use of the whole vector (a store is usually enough) to prevent it the EXTRACT_VECTOR_ELT being scalarised away.
https://github.com/llvm/llvm-project/pull/190307
More information about the llvm-commits
mailing list