summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp
diff options
context:
space:
mode:
authorDaniel Neilson <dneilson@azul.com>2018-01-12 21:33:37 +0000
committerDaniel Neilson <dneilson@azul.com>2018-01-12 21:33:37 +0000
commit2409d2420156d34036c9d5e710cf790cee1746d9 (patch)
tree1747420bd1676e20ea3231ad85e759284438c944 /llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp
parent44dfa1de3b79335ae59df168b9bf9775cdb35c99 (diff)
downloadbcm5719-llvm-2409d2420156d34036c9d5e710cf790cee1746d9.tar.gz
bcm5719-llvm-2409d2420156d34036c9d5e710cf790cee1746d9.zip
[NFC] Change MemIntrinsicInst::setAlignment() to take an unsigned instead of a Constant
Summary: In preparation for https://reviews.llvm.org/D41675 this NFC changes this prototype of MemIntrinsicInst::setAlignment() to accept an unsigned instead of a Constant. llvm-svn: 322403
Diffstat (limited to 'llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp b/llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp
index 99480f12da9..6c871bb9e7e 100644
--- a/llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp
+++ b/llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp
@@ -374,8 +374,7 @@ bool AlignmentFromAssumptionsPass::processAssumption(CallInst *ACall) {
NewAlignment = std::max(NewAlignment, AltSrcAlignment);
if (NewAlignment > MI->getAlignment()) {
- MI->setAlignment(ConstantInt::get(Type::getInt32Ty(
- MI->getParent()->getContext()), NewAlignment));
+ MI->setAlignment(NewAlignment);
++NumMemIntAlignChanged;
}
@@ -385,8 +384,7 @@ bool AlignmentFromAssumptionsPass::processAssumption(CallInst *ACall) {
assert((!isa<MemIntrinsic>(MI) || isa<MemSetInst>(MI)) &&
"Unknown memory intrinsic");
- MI->setAlignment(ConstantInt::get(Type::getInt32Ty(
- MI->getParent()->getContext()), NewDestAlignment));
+ MI->setAlignment(NewDestAlignment);
++NumMemIntAlignChanged;
}
}
OpenPOWER on IntegriCloud