[llvm] [LV][VPlan] set FastMathFlags on EVLRecipe (PR #119847)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 14 23:40:10 PST 2025
================
@@ -976,8 +976,11 @@ void VPWidenIntrinsicRecipe::execute(VPTransformState &State) {
CI->getOperandBundlesAsDefs(OpBundles);
CallInst *V = State.Builder.CreateCall(VectorF, Args, OpBundles);
-
- setFlags(V);
+ // vector-predication intrinsics only accept FMF flags, while vector intrinsic
+ // can support all flags.
+ bool VPIntrinsic = VPIntrinsic::isVPIntrinsic(VectorIntrinsicID);
+ if ((VPIntrinsic && isa<FPMathOperator>(V)) || !VPIntrinsic)
----------------
LiqinWeng wrote:
1. VP intrinsic and non-vp intrinsic flags may not be completely consistent, eg: uitofp has the nneg IR flags, but llvm.vp.uitofp seems no this flag
2. Does the current VP intrinsic support other flags? Not yet, can we support fastmath flags first?
https://github.com/llvm/llvm-project/pull/119847
More information about the llvm-commits
mailing list