fix ScalarRepl/2007-03-19-CanonicalizeMemcpy.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35169 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2007-03-19 18:25:57 +00:00
parent c1a6e30274
commit a9d1a843fc

View File

@ -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;