diff options
author | Andrew Lenharth <andrewl@lenharth.org> | 2007-11-08 17:39:28 +0000 |
---|---|---|
committer | Andrew Lenharth <andrewl@lenharth.org> | 2007-11-08 17:39:28 +0000 |
commit | 8cf11aa330c5bb19045fc237c1a8f21eb4dacce8 (patch) | |
tree | 7ba4bcc75b8327aa2b2f1a2c37dd54a9adafa502 /llvm/lib/Transforms | |
parent | f6a67bf7007e303f100ddd55612b58f8112e48ee (diff) | |
download | bcm5719-llvm-8cf11aa330c5bb19045fc237c1a8f21eb4dacce8.tar.gz bcm5719-llvm-8cf11aa330c5bb19045fc237c1a8f21eb4dacce8.zip |
Fix PR1780
llvm-svn: 43893
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 41485b203ec..c8d03be2c00 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) + if (Align == 0 && TD && !isa<OpaqueType>(GV->getType()->getElementType())) Align = TD->getPrefTypeAlignment(GV->getType()->getElementType()); // If there is a large requested alignment and we can, bump up the alignment |