Fix 'raise' to work with packed types. Patch by Morten Ofstad.
authorChris Lattner <sabre@nondot.org>
Wed, 19 Jan 2005 16:16:35 +0000 (16:16 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 19 Jan 2005 16:16:35 +0000 (16:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19693 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/LevelRaise.cpp

index 7f8c13125c8a6f283c75a1abd36fc4c9d24259e4..ebd9829b4c057c2171bf04b305022758f40931bd 100644 (file)
@@ -382,7 +382,7 @@ bool RPR::PeepholeOptimize(BasicBlock *BB, BasicBlock::iterator &BI) {
               //
               ElTy = CurSTy->getElementType(0);
             } else {
-              ElTy = cast<ArrayType>(CurCTy)->getElementType();
+              ElTy = cast<SequentialType>(CurCTy)->getElementType();
             }
 
             // Insert a zero to index through this type...