[llvm-bugs] [Bug 49694] New: error: option '-mfloat128' cannot be specified with 'ppc64le'

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Mar 23 06:46:28 PDT 2021


https://bugs.llvm.org/show_bug.cgi?id=49694

            Bug ID: 49694
           Summary: error: option '-mfloat128' cannot be specified with
                    'ppc64le'
           Product: clang
           Version: trunk
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Driver
          Assignee: unassignedclangbugs at nondot.org
          Reporter: zilla at kayari.org
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

Using -mfloat128 on ppc64 gives this error:

error: option '-mfloat128' cannot be specified with 'ppc64le'

The docs seem suggest it should be valid:
https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-mfloat128
(although a list of flags with no actual documentation isn't very clear).


clang/lib/Basic/Targets/PPC.cpp has a confusing comment:

  if (!(ArchDefs & ArchDefinePwr9) && (ArchDefs & ArchDefinePpcgr) &&
      llvm::find(FeaturesVec, "+float128") != FeaturesVec.end()) {
    // We have __float128 on PPC but not power 9 and above.
    Diags.Report(diag::err_opt_not_valid_with_opt) << "-mfloat128" << CPU;
    return false;
  }

That comment says the type should be valid for "PPC but not power 9 and above",
but what it really means is "only for power 9 and above". If you add
-mcpu=power9 then -mfloat128 is accepted. I think the comment is just badly
phrased.

The error message would be a lot more useful if it told you that you need
power9. The comment in the source should also match the code.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210323/112639df/attachment.html>


More information about the llvm-bugs mailing list