[llvm] 4de35f4 - [DAG] Add TODO to remove creation of INSERT_SUBVECTOR nodes from SimplifyMultipleUseDemandedBits

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 12 02:45:39 PDT 2022


Author: Simon Pilgrim
Date: 2022-08-12T10:45:30+01:00
New Revision: 4de35f4bbf962e2402ce1fa53b7d9393141b0c6f

URL: https://github.com/llvm/llvm-project/commit/4de35f4bbf962e2402ce1fa53b7d9393141b0c6f
DIFF: https://github.com/llvm/llvm-project/commit/4de35f4bbf962e2402ce1fa53b7d9393141b0c6f.diff

LOG: [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.

Added: 
    

Modified: 
    llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index f4f952df6c02..a6244cd71720 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))


        


More information about the llvm-commits mailing list