From 4de35f4bbf962e2402ce1fa53b7d9393141b0c6f Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Fri, 12 Aug 2022 10:45:21 +0100 Subject: [PATCH] [DAG] Add TODO to remove creation of INSERT_SUBVECTOR nodes from SimplifyMultipleUseDemandedBits SimplifyMultipleUseDemandedBits shouldn't be creating general nodes like this - although we allow bitcasts, even general constant folding is avoided. Removing it causes a number of regressions that need addressing first, but I've added a TODO for now. --- llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp index f4f952d..a6244cd 100644 --- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -856,6 +856,8 @@ SDValue TargetLowering::SimplifyMultipleUseDemandedBits( if (DemandedSubElts == 0) return Vec; // If this simply widens the lowest subvector, see if we can do it earlier. + // TODO: REMOVE ME - SimplifyMultipleUseDemandedBits shouldn't be creating + // general nodes like this. if (Idx == 0 && Vec.isUndef()) { if (SDValue NewSub = SimplifyMultipleUseDemandedBits( Sub, DemandedBits, DemandedSubElts, DAG, Depth + 1)) -- 2.7.4