[llvm-branch-commits] [llvm] IR: Remove uselist for constantdata (PR #134692)

Matt Arsenault via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun Apr 13 07:18:56 PDT 2025


================
@@ -437,7 +437,8 @@ static bool LinearizeExprTree(Instruction *I,
     for (unsigned OpIdx = 0; OpIdx < I->getNumOperands(); ++OpIdx) { // Visit operands.
       Value *Op = I->getOperand(OpIdx);
       LLVM_DEBUG(dbgs() << "OPERAND: " << *Op << " (" << Weight << ")\n");
-      assert(!Op->use_empty() && "No uses, so how did we get to it?!");
+      assert((isa<ConstantData>(Op) || !Op->use_empty()) &&
----------------
arsenm wrote:

I've started thinking maybe it shouldn't. The hasN* use cases don't really mean anything useful given the references are context wide 

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


More information about the llvm-branch-commits mailing list