[PATCH] D20916: [WIP][mips] Allow explicit ABI's in MIPS triples within LLVM.
Daniel Sanders via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 3 02:37:42 PDT 2016
dsanders added a comment.
Hi,
I'm not sure if the existing checks for `T.getEnvironment() == Triple::GNU` (which excludes GNUEABI/GNUABIHF/GNUX32) were correct or not in two places. Can someone confirm this one way or the other?
The first place is in LegalizeDAG.cpp:
static bool canCombineSinCosLibcall(SDNode *Node, const TargetLowering &TLI,
const TargetMachine &TM) {
if (!isSinCosLibcallAvailable(Node, TLI))
return false;
// GNU sin/cos functions set errno while sincos does not. Therefore
// combining sin and cos is only safe if unsafe-fpmath is enabled.
bool isGNU = Triple(TM.getTargetTriple()).getEnvironment() == Triple::GNU;
if (isGNU && !TM.Options.UnsafeFPMath)
return false;
return true;
}
GNUEABI, GNUEABIHF, and GNUX32 won't cause isGNU to be true but the comment makes it sound like they should.
The second is in TargetLoweringBase.cpp:
if (TT.getEnvironment() == Triple::GNU) {
Names[RTLIB::SINCOS_F32] = "sincosf";
Names[RTLIB::SINCOS_F64] = "sincos";
Names[RTLIB::SINCOS_F80] = "sincosl";
Names[RTLIB::SINCOS_F128] = "sincosl";
Names[RTLIB::SINCOS_PPCF128] = "sincosl";
}
There's nothing nearby that suggests that the omission of GNUEABI/GNUEABIHF/GNUX32 might be unintentional but if the LegalizeDAG.cpp one turns out to be unintentional then this one probably is too.
http://reviews.llvm.org/D20916
More information about the llvm-commits
mailing list