[PATCH] D54250: Fix not correct imm operand assertion for SUB32ri in X86CondBrFolding::analyzeCompare
Chen Jianping via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 21 05:46:09 PST 2018
Jianping updated this revision to Diff 174909.
Jianping added a comment.
update diff with format-patch -U999999
https://reviews.llvm.org/D54250
Files:
lib/Target/X86/X86CondBrFolding.cpp
Index: lib/Target/X86/X86CondBrFolding.cpp
===================================================================
--- lib/Target/X86/X86CondBrFolding.cpp
+++ lib/Target/X86/X86CondBrFolding.cpp
@@ -466,7 +466,8 @@
break;
}
SrcReg = MI.getOperand(SrcRegIndex).getReg();
- assert(MI.getOperand(ValueIndex).isImm() && "Expecting Imm operand");
+ if (!MI.getOperand(ValueIndex).isImm())
+ return false;
CmpValue = MI.getOperand(ValueIndex).getImm();
return true;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54250.174909.patch
Type: text/x-patch
Size: 481 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181121/1c12dbe8/attachment.bin>
More information about the llvm-commits
mailing list