commit | 7dc0aa3ad26b0f5cbba0c52a0258b30cd5d433da | [log] [tgz] |
---|---|---|
author | edwin <edwin@91177308-0d34-0410-b5e6-96231b3b80d8> | Sat Jan 24 17:16:04 2009 +0000 |
committer | edwin <edwin@91177308-0d34-0410-b5e6-96231b3b80d8> | Sat Jan 24 17:16:04 2009 +0000 |
tree | 30a0a35ab59083de94d2d8a79376712fe77a8823 | |
parent | e93155ca39f3984d0db0d5306356eb2bfd5f71b5 [diff] |
testcase for PR3381. Also it was an empty struct, not a void after all. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62920 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index aed0867..40289ea 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -11170,7 +11170,7 @@ while (1) { if (const StructType *STy = dyn_cast<StructType>(SrcPTy)) { - if (!STy->getNumElements()) /* Void is represented as {} */ + if (!STy->getNumElements()) /* Struct can be empty {} */ break; NewGEPIndices.push_back(Zero); SrcPTy = STy->getElementType(0);