diff options
| author | Nick Lewycky <nicholas@mxc.ca> | 2012-11-18 05:39:39 +0000 | 
|---|---|---|
| committer | Nick Lewycky <nicholas@mxc.ca> | 2012-11-18 05:39:39 +0000 | 
| commit | 3d35b45f8e709316142cd469c9e16e29b214c2a6 (patch) | |
| tree | c98dcf8f472d5199259be021b21fb5f53eb0823f /llvm/lib/Transforms | |
| parent | bea5a36b0166daeb8eff8f0c7a76d2f063927800 (diff) | |
| download | bcm5719-llvm-3d35b45f8e709316142cd469c9e16e29b214c2a6.tar.gz bcm5719-llvm-3d35b45f8e709316142cd469c9e16e29b214c2a6.zip | |
Don't try to calculate the alignment of an unsigned type. Fixes PR14371!
llvm-svn: 168280
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp | 3 | 
1 files changed, 2 insertions, 1 deletions
| diff --git a/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp b/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp index 4ab5b6e4a04..4d106fc1885 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp @@ -164,7 +164,8 @@ static unsigned getPointeeAlignment(Value *V, const DataLayout &TD) {        return TD.getPreferredAlignment(GV);    if (PointerType *PT = dyn_cast<PointerType>(V->getType())) -    return TD.getABITypeAlignment(PT->getElementType()); +    if (PT->getElementType()->isSized()) +      return TD.getABITypeAlignment(PT->getElementType());    return 0;  } | 

