forked from OSchip/llvm-project
[CGP] simplify code to get bswap in memcmp expansion; NFCI
llvm-svn: 306452
This commit is contained in:
parent
57a3f4584d
commit
352e60556e
|
@ -1969,9 +1969,7 @@ void MemCmpExpansion::emitLoadCompareBlock(unsigned Index, unsigned LoadSize,
|
|||
Value *LoadSrc2 = Builder.CreateLoad(LoadSizeType, Source2);
|
||||
|
||||
if (DL.isLittleEndian()) {
|
||||
Function *F = LoadCmpBlocks[Index]->getParent();
|
||||
|
||||
Function *Bswap = Intrinsic::getDeclaration(F->getParent(),
|
||||
Function *Bswap = Intrinsic::getDeclaration(CI->getModule(),
|
||||
Intrinsic::bswap, LoadSizeType);
|
||||
LoadSrc1 = Builder.CreateCall(Bswap, LoadSrc1);
|
||||
LoadSrc2 = Builder.CreateCall(Bswap, LoadSrc2);
|
||||
|
|
Loading…
Reference in New Issue