commit | 08ffee539e2f7e5ac1784e9cb8c1cece0e3addae | [log] [tgz] |
---|---|---|
author | Torok Edwin <edwintorok@gmail.com> | Sat Jan 24 17:16:04 2009 +0000 |
committer | Torok Edwin <edwintorok@gmail.com> | Sat Jan 24 17:16:04 2009 +0000 |
tree | 30a0a35ab59083de94d2d8a79376712fe77a8823 | |
parent | d8791e5ed702a5f11ef27ff8e40e78aa2dbee1de [diff] [blame] |
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);