[llvm-branch-commits] [llvm] IR: Remove uselist for constantdata (PR #134692)
Nikita Popov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sun Apr 13 04:01:15 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()) &&
----------------
nikic wrote:
Why do we need this change? use_empty() should still work on ConstantData?
https://github.com/llvm/llvm-project/pull/134692
More information about the llvm-branch-commits
mailing list