diff options
author | Andrew Lenharth <andrewl@lenharth.org> | 2007-11-08 18:45:15 +0000 |
---|---|---|
committer | Andrew Lenharth <andrewl@lenharth.org> | 2007-11-08 18:45:15 +0000 |
commit | 19ca5c702124c3acf8b35f6a0d75f1e682aa5aa2 (patch) | |
tree | 8a01abb43dc505bb9e6792a35a6285f51574293b /llvm/lib/Transforms | |
parent | 3eb670721ff170ac9fcf8b8b3218984db3cc8078 (diff) | |
download | bcm5719-llvm-19ca5c702124c3acf8b35f6a0d75f1e682aa5aa2.tar.gz bcm5719-llvm-19ca5c702124c3acf8b35f6a0d75f1e682aa5aa2.zip |
Better check
llvm-svn: 43897
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index c8d03be2c00..efcd8e32972 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -7582,7 +7582,7 @@ static unsigned GetOrEnforceKnownAlignment(Value *V, TargetData *TD, unsigned PrefAlign = 0) { if (GlobalVariable *GV = dyn_cast<GlobalVariable>(V)) { unsigned Align = GV->getAlignment(); - if (Align == 0 && TD && !isa<OpaqueType>(GV->getType()->getElementType())) + if (Align == 0 && TD && GV->getType()->getElementType()->isSized()) Align = TD->getPrefTypeAlignment(GV->getType()->getElementType()); // If there is a large requested alignment and we can, bump up the alignment |