summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2016-06-15 22:01:28 +0000
committerSanjay Patel <spatel@rotateright.com>2016-06-15 22:01:28 +0000
commit595098f9f2d1987f84f9b88adec57eae9d245d92 (patch)
tree2eb6632e64cf4de31ba225ddbaf0399aa46c7f37 /llvm/lib
parent1eaecefaf9cac9b5bbf54932eda0013ec32d041d (diff)
downloadbcm5719-llvm-595098f9f2d1987f84f9b88adec57eae9d245d92.tar.gz
bcm5719-llvm-595098f9f2d1987f84f9b88adec57eae9d245d92.zip
fix comments; NFC
llvm-svn: 272848
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/IR/AutoUpgrade.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/IR/AutoUpgrade.cpp b/llvm/lib/IR/AutoUpgrade.cpp
index c0b4fd7b1c9..6e4cced62e1 100644
--- a/llvm/lib/IR/AutoUpgrade.cpp
+++ b/llvm/lib/IR/AutoUpgrade.cpp
@@ -518,9 +518,8 @@ static Value *UpgradeMaskedLoad(IRBuilder<> &Builder, LLVMContext &C,
return Builder.CreateMaskedLoad(Ptr, Align, Mask, Passthru);
}
-// UpgradeIntrinsicCall - Upgrade a call to an old intrinsic to be a call the
-// upgraded intrinsic. All argument and return casting must be provided in
-// order to seamlessly integrate with existing context.
+/// Upgrade a call to an old intrinsic. All argument and return casting must be
+/// provided to seamlessly integrate with existing context.
void llvm::UpgradeIntrinsicCall(CallInst *CI, Function *NewFn) {
Function *F = CI->getCalledFunction();
LLVMContext &C = CI->getContext();
@@ -534,18 +533,16 @@ void llvm::UpgradeIntrinsicCall(CallInst *CI, Function *NewFn) {
StringRef Name = F->getName();
Value *Rep;
- // Upgrade packed integer vector compares intrinsics to compare instructions
+ // Upgrade packed integer vector compare intrinsics to compare instructions.
if (Name.startswith("llvm.x86.sse2.pcmpeq.") ||
Name.startswith("llvm.x86.avx2.pcmpeq.")) {
Rep = Builder.CreateICmpEQ(CI->getArgOperand(0), CI->getArgOperand(1),
"pcmpeq");
- // need to sign extend since icmp returns vector of i1
Rep = Builder.CreateSExt(Rep, CI->getType(), "");
} else if (Name.startswith("llvm.x86.sse2.pcmpgt.") ||
Name.startswith("llvm.x86.avx2.pcmpgt.")) {
Rep = Builder.CreateICmpSGT(CI->getArgOperand(0), CI->getArgOperand(1),
"pcmpgt");
- // need to sign extend since icmp returns vector of i1
Rep = Builder.CreateSExt(Rep, CI->getType(), "");
} else if (Name == "llvm.x86.sse2.cvtdq2pd" ||
Name == "llvm.x86.sse2.cvtps2pd" ||
OpenPOWER on IntegriCloud