mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 22:04:55 +00:00
Autoupgrade support the rename of x86.fma4 intrinsics to x86.fma from r157898.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157899 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
529ce07c5f
commit
7678de45b2
@ -64,6 +64,80 @@ static bool UpgradeIntrinsicFunction1(Function *F, Function *&NewFn) {
|
||||
NewFn = 0;
|
||||
return true;
|
||||
}
|
||||
// Fix the FMA4 intrinsics to remove the 4
|
||||
if (Name.startswith("x86.fma4.")) {
|
||||
const char* NewFnName = 0;
|
||||
if (Name == "x86.fma4.vfmadd.ss")
|
||||
NewFnName = "llvm.x86.fma.vfmadd.ss";
|
||||
else if (Name == "x86.fma4.vfmadd.sd")
|
||||
NewFnName = "llvm.x86.fma.vfmadd.sd";
|
||||
else if (Name == "x86.fma4.vfmadd.ps")
|
||||
NewFnName = "llvm.x86.fma.vfmadd.ps";
|
||||
else if (Name == "x86.fma4.vfmadd.pd")
|
||||
NewFnName = "llvm.x86.fma.vfmadd.pd";
|
||||
else if (Name == "x86.fma4.vfmadd.ps.256")
|
||||
NewFnName = "llvm.x86.fma.vfmadd.ps.256";
|
||||
else if (Name == "x86.fma4.vfmadd.pd.256")
|
||||
NewFnName = "llvm.x86.fma.vfmadd.pd.256";
|
||||
else if (Name == "x86.fma4.vfmsub.ss")
|
||||
NewFnName = "llvm.x86.fma.vfmsub.ss";
|
||||
else if (Name == "x86.fma4.vfmsub.sd")
|
||||
NewFnName = "llvm.x86.fma.vfmsub.sd";
|
||||
else if (Name == "x86.fma4.vfmsub.ps")
|
||||
NewFnName = "llvm.x86.fma.vfmsub.ps";
|
||||
else if (Name == "x86.fma4.vfmsub.pd")
|
||||
NewFnName = "llvm.x86.fma.vfmsub.pd";
|
||||
else if (Name == "x86.fma4.vfmsub.ps.256")
|
||||
NewFnName = "llvm.x86.fma.vfmsub.ps.256";
|
||||
else if (Name == "x86.fma4.vfmsub.pd.256")
|
||||
NewFnName = "llvm.x86.fma.vfmsub.pd.256";
|
||||
else if (Name == "x86.fma4.vfnmadd.ss")
|
||||
NewFnName = "llvm.x86.fma.vfnmadd.ss";
|
||||
else if (Name == "x86.fma4.vfnmadd.sd")
|
||||
NewFnName = "llvm.x86.fma.vfnmadd.sd";
|
||||
else if (Name == "x86.fma4.vfnmadd.ps")
|
||||
NewFnName = "llvm.x86.fma.vfnmadd.ps";
|
||||
else if (Name == "x86.fma4.vfnmadd.pd")
|
||||
NewFnName = "llvm.x86.fma.vfnmadd.pd";
|
||||
else if (Name == "x86.fma4.vfnmadd.ps.256")
|
||||
NewFnName = "llvm.x86.fma.vfnmadd.ps.256";
|
||||
else if (Name == "x86.fma4.vfnmadd.pd.256")
|
||||
NewFnName = "llvm.x86.fma.vfnmadd.pd.256";
|
||||
else if (Name == "x86.fma4.vfnmsub.ss")
|
||||
NewFnName = "llvm.x86.fma.vfnmsub.ss";
|
||||
else if (Name == "x86.fma4.vfnmsub.sd")
|
||||
NewFnName = "llvm.x86.fma.vfnmsub.sd";
|
||||
else if (Name == "x86.fma4.vfnmsub.ps")
|
||||
NewFnName = "llvm.x86.fma.vfnmsub.ps";
|
||||
else if (Name == "x86.fma4.vfnmsub.pd")
|
||||
NewFnName = "llvm.x86.fma.vfnmsub.pd";
|
||||
else if (Name == "x86.fma4.vfnmsub.ps.256")
|
||||
NewFnName = "llvm.x86.fma.vfnmsub.ps.256";
|
||||
else if (Name == "x86.fma4.vfnmsub.pd.256")
|
||||
NewFnName = "llvm.x86.fma.vfnmsub.pd.256";
|
||||
else if (Name == "x86.fma4.vfmaddsub.ps")
|
||||
NewFnName = "llvm.x86.fma.vfmaddsub.ps";
|
||||
else if (Name == "x86.fma4.vfmaddsub.pd")
|
||||
NewFnName = "llvm.x86.fma.vfmaddsub.pd";
|
||||
else if (Name == "x86.fma4.vfmaddsub.ps.256")
|
||||
NewFnName = "llvm.x86.fma.vfmaddsub.ps.256";
|
||||
else if (Name == "x86.fma4.vfmaddsub.pd.256")
|
||||
NewFnName = "llvm.x86.fma.vfmaddsub.pd.256";
|
||||
else if (Name == "x86.fma4.vfmsubadd.ps")
|
||||
NewFnName = "llvm.x86.fma.vfmsubadd.ps";
|
||||
else if (Name == "x86.fma4.vfmsubadd.pd")
|
||||
NewFnName = "llvm.x86.fma.vfmsubadd.pd";
|
||||
else if (Name == "x86.fma4.vfmsubadd.ps.256")
|
||||
NewFnName = "llvm.x86.fma.vfmsubadd.ps.256";
|
||||
else if (Name == "x86.fma4.vfmsubadd.pd.256")
|
||||
NewFnName = "llvm.x86.fma.vfmsubadd.pd.256";
|
||||
|
||||
if (NewFnName) {
|
||||
F->setName(NewFnName);
|
||||
NewFn = F;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user