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 | b410df995c592491746ed76039edb62f5cdbf8cf (patch) | |
tree | d80736e874f99a59a3159224af9e5279b3a51f14 /lib/Transforms | |
parent | ab9338eb9f18a1303e271ed144f78c29a48ff011 (diff) | |
download | external_llvm-b410df995c592491746ed76039edb62f5cdbf8cf.zip external_llvm-b410df995c592491746ed76039edb62f5cdbf8cf.tar.gz external_llvm-b410df995c592491746ed76039edb62f5cdbf8cf.tar.bz2 |
Better check
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43897 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index c8d03be..efcd8e3 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/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 |