[llvm] [VPlan] Preserve trunc nuw/nsw in VPRecipeWithIRFlags (PR #144700)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 23 05:23:56 PDT 2025


================
@@ -595,7 +595,7 @@ class VPSingleDefRecipe : public VPRecipeBase, public VPValue {
 class VPIRFlags {
   enum class OperationType : unsigned char {
     Cmp,
-    OverflowingBinOp,
+    WrappingOp,
----------------
fhahn wrote:

The op-type is used to verify that we only query flags for operations that are valid; without the new Trunc op-type, if new flags are added to overflowing binary op, then we would not catch cases where the new flags would be queried for a recipe for a trunc.

For now, it might be sufficient to have a separate op-type for Trunc, but use the same storage for the flags for now.

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


More information about the llvm-commits mailing list