[llvm] [RISCV] Support select/merge like ops for bf16 vectors when have Zvfbfmin (PR #91936)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 12 17:02:23 PDT 2024
================
@@ -1451,7 +1451,9 @@ foreach fvti = AllFloatVectors in {
fvti.RegClass:$rs2, 0, (fvti.Mask V0), fvti.AVL, fvti.Log2SEW)>;
}
- let Predicates = GetVTypePredicates<fvti>.Predicates in
+
+ let Predicates = !listconcat(GetVTypePredicates<GetFpVTypeInfo<fvti>.Vti>.Predicates,
+ GetVTypeScalarPredicates<fvti>.Predicates) in
def : Pat<(fvti.Vector (vselect (fvti.Mask V0),
(SplatFPOp fvti.ScalarRegClass:$rs1),
----------------
topperc wrote:
This patern isn't valid for bf16. If the scalar F register isn't properly nan-boxed it will create the wrong nan value in the vector domain.
https://github.com/llvm/llvm-project/pull/91936
More information about the llvm-commits
mailing list