From ff87bf1169de7f9732838675e4066f4aabe8342f Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Tue, 20 Oct 2015 00:00:17 +0000 Subject: [PATCH] [X86] Remove a few 'else' after 'return' git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250764 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Basic/Targets.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index 7efc6755da..b263f5ea78 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -2386,9 +2386,9 @@ public: StringRef getABI() const override { if (getTriple().getArch() == llvm::Triple::x86_64 && SSELevel >= AVX512F) return "avx512"; - else if (getTriple().getArch() == llvm::Triple::x86_64 && SSELevel >= AVX) + if (getTriple().getArch() == llvm::Triple::x86_64 && SSELevel >= AVX) return "avx"; - else if (getTriple().getArch() == llvm::Triple::x86 && + if (getTriple().getArch() == llvm::Triple::x86 && MMX3DNowLevel == NoMMX3DNow) return "no-mmx"; return ""; @@ -3025,11 +3025,10 @@ bool X86TargetInfo::handleTargetFeatures(std::vector &Features, // LLVM doesn't have a separate switch for fpmath, so only accept it if it // matches the selected sse level. - if (FPMath == FP_SSE && SSELevel < SSE1) { - Diags.Report(diag::err_target_unsupported_fpmath) << "sse"; - return false; - } else if (FPMath == FP_387 && SSELevel >= SSE1) { - Diags.Report(diag::err_target_unsupported_fpmath) << "387"; + if ((FPMath == FP_SSE && SSELevel < SSE1) || + (FPMath == FP_387 && SSELevel >= SSE1)) { + Diags.Report(diag::err_target_unsupported_fpmath) << + (FPMath == FP_SSE ? "sse" : "387"); return false; } -- 2.40.0