summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/CodeGenPrepare.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2017-06-27 19:31:35 +0000
committerSanjay Patel <spatel@rotateright.com>2017-06-27 19:31:35 +0000
commit352e60556e23086dc35f2db9f7860e367257e321 (patch)
treeed92634c6085f5a4de41231cf473ed3184ad4164 /llvm/lib/CodeGen/CodeGenPrepare.cpp
parent57a3f4584d1aa94918d87687acb908801f4abbfe (diff)
downloadbcm5719-llvm-352e60556e23086dc35f2db9f7860e367257e321.tar.gz
bcm5719-llvm-352e60556e23086dc35f2db9f7860e367257e321.zip
[CGP] simplify code to get bswap in memcmp expansion; NFCI
llvm-svn: 306452
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
-rw-r--r--llvm/lib/CodeGen/CodeGenPrepare.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp
index bae074fb604..7c9f0b2106f 100644
--- a/llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -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);
OpenPOWER on IntegriCloud