summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp3
-rw-r--r--llvm/lib/CodeGen/TargetLoweringBase.cpp2
2 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 4c6ae245f5a..02234793e49 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -2176,8 +2176,7 @@ static bool canCombineSinCosLibcall(SDNode *Node, const TargetLowering &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)
+ if (TM.getTargetTriple().isGNUEnvironment() && !TM.Options.UnsafeFPMath)
return false;
return true;
}
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp
index aa7c4a67209..a4db08ab534 100644
--- a/llvm/lib/CodeGen/TargetLoweringBase.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp
@@ -473,7 +473,7 @@ static void InitLibcallNames(const char **Names, const Triple &TT) {
Names[RTLIB::ATOMIC_FETCH_NAND_8] = "__atomic_fetch_nand_8";
Names[RTLIB::ATOMIC_FETCH_NAND_16] = "__atomic_fetch_nand_16";
- if (TT.getEnvironment() == Triple::GNU) {
+ if (TT.isGNUEnvironment()) {
Names[RTLIB::SINCOS_F32] = "sincosf";
Names[RTLIB::SINCOS_F64] = "sincos";
Names[RTLIB::SINCOS_F80] = "sincosl";
OpenPOWER on IntegriCloud