[llvm] f582cd3 - [SelectionDAG] Fix a warning

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 30 17:49:57 PDT 2024


Author: Kazu Hirata
Date: 2024-10-30T17:49:51-07:00
New Revision: f582cd3dc70fa8c9519f74f16ab0a33ad663038e

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

LOG: [SelectionDAG] Fix a warning

This patch fixes:

  llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1489:17: error:
  unused variable 'Flags' [-Werror,-Wunused-variable]

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 8ab7935347d569..fabcbc5f0e856d 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -1486,7 +1486,6 @@ bool TargetLowering::SimplifyDemandedBits(
   case ISD::OR: {
     SDValue Op0 = Op.getOperand(0);
     SDValue Op1 = Op.getOperand(1);
-    SDNodeFlags Flags = Op.getNode()->getFlags();
     if (SimplifyDemandedBits(Op1, DemandedBits, DemandedElts, Known, TLO,
                              Depth + 1)) {
       Op->dropFlags(SDNodeFlags::Disjoint);


        


More information about the llvm-commits mailing list