[llvm] [LV][VPlan] set FastMathFlags on EVLRecipe (PR #119847)

via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 23 19:07:06 PST 2024


================
@@ -1516,16 +1516,23 @@ static void transformRecipestoEVLRecipes(VPlan &Plan, VPValue &EVL) {
                         IntegerType::getInt1Ty(CI->getContext())));
                     Ops.push_back(Mask);
                     Ops.push_back(&EVL);
+                    FastMathFlags FMF = {};
+                    if (isa<FPMathOperator>(CI))
+                      FMF = CI->getFastMathFlags();
                     return new VPWidenIntrinsicRecipe(
-                        VPID, Ops, TypeInfo.inferScalarType(CInst),
+                        VPID, Ops, TypeInfo.inferScalarType(CInst), FMF,
                         CInst->getDebugLoc());
                   })
               .Case<VPWidenSelectRecipe>([&](VPWidenSelectRecipe *Sel) {
+                auto *SelInst = dyn_cast<SelectInst>(Sel->getUnderlyingInstr());
----------------
LiqinWeng wrote:

pls review: #121023

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


More information about the llvm-commits mailing list