projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c1a6e30
)
fix ScalarRepl/2007-03-19-CanonicalizeMemcpy.ll
author
Chris Lattner
<sabre@nondot.org>
Mon, 19 Mar 2007 18:25:57 +0000
(18:25 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Mon, 19 Mar 2007 18:25:57 +0000
(18:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35169
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/ScalarReplAggregates.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/ScalarReplAggregates.cpp
b/lib/Transforms/Scalar/ScalarReplAggregates.cpp
index 880e8df72c55e0873047a78ecc3c6c86625332e1..a26fcbefe810ff5716715e2111727117a5a54c97 100644
(file)
--- a/
lib/Transforms/Scalar/ScalarReplAggregates.cpp
+++ b/
lib/Transforms/Scalar/ScalarReplAggregates.cpp
@@
-661,7
+661,8
@@
void SROA::CanonicalizeAllocaUsers(AllocationInst *AI) {
// up.
for (Value::use_iterator UI = AI->use_begin(), E = AI->use_end();
UI != E; ) {
- GetElementPtrInst *GEPI = cast<GetElementPtrInst>(*UI++);
+ GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(*UI++);
+ if (!GEPI) continue;
gep_type_iterator I = gep_type_begin(GEPI);
++I;