diff options
author | Craig Topper <craig.topper@gmail.com> | 2017-02-18 21:50:58 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2017-02-18 21:50:58 +0000 |
commit | 58ee25f913e2807aaf93f7d2e0f5b8771dde4f67 (patch) | |
tree | 62634b978cf86acc8c2a36d61752553c25984132 /lib/IR/AutoUpgrade.cpp | |
parent | 33dd2865215cb3cb3e115d61faab8655f29aa5b3 (diff) |
Recommit "[X86] Remove XOP VPCMOV intrinsics and autoupgrade them to native IR."
Clang has now been fixed to not use these intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295571 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/AutoUpgrade.cpp')
-rw-r--r-- | lib/IR/AutoUpgrade.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/IR/AutoUpgrade.cpp b/lib/IR/AutoUpgrade.cpp index 977a61f0542..374ebffabf1 100644 --- a/lib/IR/AutoUpgrade.cpp +++ b/lib/IR/AutoUpgrade.cpp @@ -230,7 +230,7 @@ static bool ShouldUpgradeX86Intrinsic(Function *F, StringRef Name) { Name.startswith("avx2.pblendd.") || // Added in 3.7 Name.startswith("avx.vbroadcastf128") || // Added in 4.0 Name == "avx2.vbroadcasti128" || // Added in 3.7 - Name == "xop.vpcmov" || // Added in 3.8 + Name.startswith("xop.vpcmov") || // Added in 3.8 Name.startswith("avx512.mask.move.s") || // Added in 4.0 (Name.startswith("xop.vpcom") && // Added in 3.2 F->arg_size() == 2)) @@ -1078,7 +1078,7 @@ void llvm::UpgradeIntrinsicCall(CallInst *CI, Function *NewFn) { Rep = Builder.CreateCall(VPCOM, {CI->getArgOperand(0), CI->getArgOperand(1), Builder.getInt8(Imm)}); - } else if (IsX86 && Name == "xop.vpcmov") { + } else if (IsX86 && Name.startswith("xop.vpcmov")) { Value *Sel = CI->getArgOperand(2); Value *NotSel = Builder.CreateNot(Sel); Value *Sel0 = Builder.CreateAnd(CI->getArgOperand(0), Sel); |