[llvm] r324148 - [InstCombine] Use getDestAlignment in SimplifyMemSet (NFC)
Daniel Neilson via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 2 14:03:03 PST 2018
Author: dneilson
Date: Fri Feb 2 14:03:03 2018
New Revision: 324148
URL: http://llvm.org/viewvc/llvm-project?rev=324148&view=rev
Log:
[InstCombine] Use getDestAlignment in SimplifyMemSet (NFC)
Summary:
Small NFC change to change the name of the function used getting and setting
the alignment of a memset.
Modified:
llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp?rev=324148&r1=324147&r2=324148&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp Fri Feb 2 14:03:03 2018
@@ -265,8 +265,8 @@ Instruction *InstCombiner::SimplifyMemTr
Instruction *InstCombiner::SimplifyMemSet(MemSetInst *MI) {
unsigned Alignment = getKnownAlignment(MI->getDest(), DL, MI, &AC, &DT);
- if (MI->getAlignment() < Alignment) {
- MI->setAlignment(Alignment);
+ if (MI->getDestAlignment() < Alignment) {
+ MI->setDestAlignment(Alignment);
return MI;
}
More information about the llvm-commits
mailing list