[X86] Combine some of the strings in autoupgrade code.

llvm-svn: 280603
This commit is contained in:
Craig Topper 2016-09-03 23:55:13 +00:00
parent 7a28a7fbd8
commit a57d2ca406
1 changed files with 7 additions and 35 deletions

View File

@ -290,26 +290,14 @@ static bool UpgradeIntrinsicFunction1(Function *F, Function *&NewFn) {
Name.startswith("sse.storeu.") ||
Name.startswith("sse2.storeu.") ||
Name.startswith("avx.storeu.") ||
Name.startswith("avx512.mask.storeu.p") ||
Name.startswith("avx512.mask.storeu.b.") ||
Name.startswith("avx512.mask.storeu.w.") ||
Name.startswith("avx512.mask.storeu.d.") ||
Name.startswith("avx512.mask.storeu.q.") ||
Name.startswith("avx512.mask.storeu.") ||
Name.startswith("avx512.mask.store.p") ||
Name.startswith("avx512.mask.store.b.") ||
Name.startswith("avx512.mask.store.w.") ||
Name.startswith("avx512.mask.store.d.") ||
Name.startswith("avx512.mask.store.q.") ||
Name.startswith("avx512.mask.loadu.p") ||
Name.startswith("avx512.mask.loadu.b.") ||
Name.startswith("avx512.mask.loadu.w.") ||
Name.startswith("avx512.mask.loadu.d.") ||
Name.startswith("avx512.mask.loadu.q.") ||
Name.startswith("avx512.mask.load.p") ||
Name.startswith("avx512.mask.load.b.") ||
Name.startswith("avx512.mask.load.w.") ||
Name.startswith("avx512.mask.load.d.") ||
Name.startswith("avx512.mask.load.q.") ||
Name.startswith("avx512.mask.loadu.") ||
Name.startswith("avx512.mask.load.") ||
Name == "sse42.crc32.64.8" ||
Name.startswith("avx.vbroadcast.s") ||
Name.startswith("avx512.mask.palignr.") ||
@ -815,41 +803,25 @@ void llvm::UpgradeIntrinsicCall(CallInst *CI, Function *NewFn) {
// Remove intrinsic.
CI->eraseFromParent();
return;
} else if (IsX86 && (Name.startswith("avx512.mask.storeu.p") ||
Name.startswith("avx512.mask.storeu.b.") ||
Name.startswith("avx512.mask.storeu.w.") ||
Name.startswith("avx512.mask.storeu.d.") ||
Name.startswith("avx512.mask.storeu.q."))) {
} else if (IsX86 && (Name.startswith("avx512.mask.storeu."))) {
UpgradeMaskedStore(Builder, CI->getArgOperand(0), CI->getArgOperand(1),
CI->getArgOperand(2), /*Aligned*/false);
// Remove intrinsic.
CI->eraseFromParent();
return;
} else if (IsX86 && (Name.startswith("avx512.mask.store.p") ||
Name.startswith("avx512.mask.store.b.") ||
Name.startswith("avx512.mask.store.w.") ||
Name.startswith("avx512.mask.store.d.") ||
Name.startswith("avx512.mask.store.q."))) {
} else if (IsX86 && (Name.startswith("avx512.mask.store."))) {
UpgradeMaskedStore(Builder, CI->getArgOperand(0), CI->getArgOperand(1),
CI->getArgOperand(2), /*Aligned*/true);
// Remove intrinsic.
CI->eraseFromParent();
return;
} else if (IsX86 && (Name.startswith("avx512.mask.loadu.p") ||
Name.startswith("avx512.mask.loadu.b.") ||
Name.startswith("avx512.mask.loadu.w.") ||
Name.startswith("avx512.mask.loadu.d.") ||
Name.startswith("avx512.mask.loadu.q."))) {
} else if (IsX86 && (Name.startswith("avx512.mask.loadu."))) {
Rep = UpgradeMaskedLoad(Builder, CI->getArgOperand(0),
CI->getArgOperand(1), CI->getArgOperand(2),
/*Aligned*/false);
} else if (IsX86 && (Name.startswith("avx512.mask.load.p") ||
Name.startswith("avx512.mask.load.b.") ||
Name.startswith("avx512.mask.load.w.") ||
Name.startswith("avx512.mask.load.d.") ||
Name.startswith("avx512.mask.load.q."))) {
} else if (IsX86 && (Name.startswith("avx512.mask.load."))) {
Rep = UpgradeMaskedLoad(Builder, CI->getArgOperand(0),
CI->getArgOperand(1),CI->getArgOperand(2),
/*Aligned*/true);