diff options
author | Chris Lattner <sabre@nondot.org> | 2010-12-25 20:37:57 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-12-25 20:37:57 +0000 |
commit | 687140c818ba4b896329a83324714140b6580ef8 (patch) | |
tree | 2ee1d92e57ae2cc947d35922b95fcebe638e4cf7 /lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp | |
parent | 43ee29d418c4df3dee00e77bec7030bc10cb837c (diff) | |
download | external_llvm-687140c818ba4b896329a83324714140b6580ef8.zip external_llvm-687140c818ba4b896329a83324714140b6580ef8.tar.gz external_llvm-687140c818ba4b896329a83324714140b6580ef8.tar.bz2 |
Move getOrEnforceKnownAlignment out of instcombine into Transforms/Utils.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122554 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp')
-rw-r--r-- | lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp b/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp index 992a5d9..c2a8b7c 100644 --- a/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp +++ b/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp @@ -145,7 +145,7 @@ Instruction *InstCombiner::visitLoadInst(LoadInst &LI) { // Attempt to improve the alignment. if (TD) { unsigned KnownAlign = - GetOrEnforceKnownAlignment(Op, TD->getPrefTypeAlignment(LI.getType())); + getOrEnforceKnownAlignment(Op, TD->getPrefTypeAlignment(LI.getType()),TD); unsigned LoadAlign = LI.getAlignment(); unsigned EffectiveLoadAlign = LoadAlign != 0 ? LoadAlign : TD->getABITypeAlignment(LI.getType()); @@ -416,7 +416,8 @@ Instruction *InstCombiner::visitStoreInst(StoreInst &SI) { // Attempt to improve the alignment. if (TD) { unsigned KnownAlign = - GetOrEnforceKnownAlignment(Ptr, TD->getPrefTypeAlignment(Val->getType())); + getOrEnforceKnownAlignment(Ptr, TD->getPrefTypeAlignment(Val->getType()), + TD); unsigned StoreAlign = SI.getAlignment(); unsigned EffectiveStoreAlign = StoreAlign != 0 ? StoreAlign : TD->getABITypeAlignment(Val->getType()); |