[PATCH] D21881: PeepholeOptimizer: Relax assert
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 29 17:20:09 PDT 2016
arsenm created this revision.
arsenm added a reviewer: qcolombet.
arsenm added a subscriber: llvm-commits.
Allow implicit defs
http://reviews.llvm.org/D21881
Files:
lib/CodeGen/PeepholeOptimizer.cpp
Index: lib/CodeGen/PeepholeOptimizer.cpp
===================================================================
--- lib/CodeGen/PeepholeOptimizer.cpp
+++ lib/CodeGen/PeepholeOptimizer.cpp
@@ -1889,8 +1889,10 @@
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())
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21881.62318.patch
Type: text/x-patch
Size: 704 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160630/40c514af/attachment.bin>
More information about the llvm-commits
mailing list