[llvm] [LV][VPlan] Change the inheritance of class VPWidenSelectRecipe to class VPRecipeWithIRFlags, which allows recipe of the select to pass the fastmath flags (PR #121023)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 23 19:06:14 PST 2024
https://github.com/LiqinWeng created https://github.com/llvm/llvm-project/pull/121023
The patch of #119847 will add the fastmath flag to for recipe
>From bfdd6e5bc3c475ae4152f5791e30fc5bfe8c6d46 Mon Sep 17 00:00:00 2001
From: LiqinWeng <liqin.weng at spacemit.com>
Date: Tue, 24 Dec 2024 11:03:38 +0800
Subject: [PATCH] [LV][VPlan] Change the inheritance of class
VPWidenSelectRecipe to class VPRecipeWithIRFlags, which allows recipe of the
select to pass the fastmath flags
The patch of #119847 will add the fastmath flag to for recipe
---
llvm/lib/Transforms/Vectorize/VPlan.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h
index 6486c6745a6800..4f457e9876358b 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -1813,11 +1813,10 @@ class VPHistogramRecipe : public VPRecipeBase {
};
/// A recipe for widening select instructions.
-struct VPWidenSelectRecipe : public VPSingleDefRecipe {
+struct VPWidenSelectRecipe : public VPRecipeWithIRFlags {
template <typename IterT>
VPWidenSelectRecipe(SelectInst &I, iterator_range<IterT> Operands)
- : VPSingleDefRecipe(VPDef::VPWidenSelectSC, Operands, &I,
- I.getDebugLoc()) {}
+ : VPRecipeWithIRFlags(VPDef::VPWidenSelectSC, Operands, I) {}
~VPWidenSelectRecipe() override = default;
More information about the llvm-commits
mailing list