<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 12/01/2014 10:19 AM, Pekka Jääskeläinen wrote:<br>
    <blockquote cite="mid:547C8711.3000201@tut.fi" type="cite">Hi,
      <br>
      <br>
      Here's a trivial patch to relax the FP math also
      <br>
      if -cl-fast-relaxed-math is set.
      <br>
    </blockquote>
    <br>
    I think the test should also check for the function target
    attribute.<br>
    <br>
    What about the other flags? I think this patch should handle (maybe
    just test?) all of the CL fast math flags instead of just this one (<br>
    -cl-no-signed-zeros, -cl-unsafe-math-optimizations,
    -cl-finite-math-only, and -cl-fast-relaxed-math)<br>
    <br>
    <blockquote cite="mid:547C8711.3000201@tut.fi" type="cite">
      <br>
      This supersedes the previous patch with title
      <br>
      "if unsafe-fp-math FN attribute is set, enable reduction
      <br>
      detection with float operations"
      <br>
      <br>
      On 11/28/2014 08:04 PM, Pekka Jääskeläinen wrote:
      <br>
      <blockquote type="cite">Hi Hal,
        <br>
        <br>
        OK, I didn't know which way was the chosen "future approach" or
        <br>
        if they both are used for some use cases.
        <br>
        <br>
        I just noticed that when I set -cl-fast-relaxed-math in OpenCL
        C,
        <br>
        it didn't propagate to the FP instructions as 'fast' attributes,
        <br>
        but the func attribute did get set.
        <br>
        <br>
        So I suppose it should be investigated why the flags are not
        <br>
        generated to the produced instructions in this case instead
        <br>
        in case the fnattr is deprecated?
        <br>
        <br>
        On 11/28/2014 07:43 PM, Hal Finkel wrote:
        <br>
        <blockquote type="cite">Pekka,
          <br>
          <br>
          What's your motivation for doing this? Aside from the fact
          that we
          <br>
          can't yet set fast math flags on function calls (to sqrt,
          etc.), I
          <br>
          think we're pretty close to removing the function attribute
          all
          <br>
          together. The instruction-level flags play much nicer with
          LTO, and
          <br>
          give more precision control to the frontends; it is not clear
          to me
          <br>
          that overriding them with the function-level attribute is
          desirable.
          <br>
          <br>
          -Hal
          <br>
          <br>
          ----- Original Message -----
          <br>
          <blockquote type="cite">From: "Pekka Jääskeläinen"
            <a class="moz-txt-link-rfc2396E" href="mailto:pekka.jaaskelainen@tut.fi"><pekka.jaaskelainen@tut.fi></a> To: "Commit
            <br>
            Messages and Patches for LLVM"
            <a class="moz-txt-link-rfc2396E" href="mailto:llvm-commits@cs.uiuc.edu"><llvm-commits@cs.uiuc.edu></a> Sent:
            <br>
            Friday, November 28, 2014 11:13:39 AM Subject: [PATCH]
            <br>
            [LoopVectorizer] if unsafe-fp-math FN attribute is set,
            enable
            <br>
            reduction detection with float operations
            <br>
            <br>
            Hi,
            <br>
            <br>
            The attached patch checks the function attributes for
            <br>
            "unsafe-fp-math" to relax FP constraints when detecting
            reduction
            <br>
            operations.
            <br>
            <br>
            -- --Pekka
            <br>
            <br>
            _______________________________________________ llvm-commits
            <br>
            mailing list <a class="moz-txt-link-abbreviated" href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a>
            <br>
            <a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a>
            <br>
            <br>
          </blockquote>
          <br>
        </blockquote>
        <br>
        <br>
      </blockquote>
      <br>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
cfe-commits mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>