[PATCH] Fix assertion failure in global-merge with unused ConstantExpr
Oliver Stannard
oliver.stannard at arm.com
Mon Jun 8 09:59:46 PDT 2015
REPOSITORY
rL LLVM
http://reviews.llvm.org/D10314
Files:
llvm/trunk/lib/CodeGen/GlobalMerge.cpp
Index: llvm/trunk/lib/CodeGen/GlobalMerge.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/GlobalMerge.cpp
+++ llvm/trunk/lib/CodeGen/GlobalMerge.cpp
@@ -280,6 +280,8 @@
// users, so look through ConstantExpr...
Use *UI, *UE;
if (ConstantExpr *CE = dyn_cast<ConstantExpr>(U.getUser())) {
+ if (CE->use_empty())
+ continue;
UI = &*CE->use_begin();
UE = nullptr;
} else if (isa<Instruction>(U.getUser())) {
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10314.27316.patch
Type: text/x-patch
Size: 517 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150608/ac1f9530/attachment.bin>
More information about the llvm-commits
mailing list