[llvm] r274402 - PeepholeOptimizer: Relax assert
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 1 16:15:07 PDT 2016
Author: arsenm
Date: Fri Jul 1 18:15:06 2016
New Revision: 274402
URL: http://llvm.org/viewvc/llvm-project?rev=274402&view=rev
Log:
PeepholeOptimizer: Relax assert
Allow implicit defs
Modified:
llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp
Modified: llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp?rev=274402&r1=274401&r2=274402&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp (original)
+++ llvm/trunk/lib/CodeGen/PeepholeOptimizer.cpp Fri Jul 1 18:15:06 2016
@@ -1887,8 +1887,10 @@ ValueTrackerResult ValueTracker::getNext
assert(Def && "This method needs a valid definition");
assert(
- (DefIdx < Def->getDesc().getNumDefs() || Def->getDesc().isVariadic()) &&
- Def->getOperand(DefIdx).isDef() && "Invalid DefIdx");
+ (Def->getOperand(DefIdx).isDef() &&
+ (DefIdx < Def->getDesc().getNumDefs() || Def->getDesc().isVariadic()) ||
+ Def->getOperand(DefIdx).isImplicit()) &&
+ "Invalid DefIdx");
if (Def->isCopy())
return getNextSourceFromCopy();
if (Def->isBitcast())
More information about the llvm-commits
mailing list