summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2007-11-08 17:39:28 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2007-11-08 17:39:28 +0000
commit8cf11aa330c5bb19045fc237c1a8f21eb4dacce8 (patch)
tree7ba4bcc75b8327aa2b2f1a2c37dd54a9adafa502 /llvm/lib/Transforms
parentf6a67bf7007e303f100ddd55612b58f8112e48ee (diff)
downloadbcm5719-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.cpp2
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
OpenPOWER on IntegriCloud