<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>184909</bug_id>
          
          <creation_ts>2018-04-24 00:46:25 -0700</creation_ts>
          <short_desc>Disable usage of fused multiply-add instructions for JSC with compiler flag</short_desc>
          <delta_ts>2018-05-03 04:59:20 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dominik Inführ">dominik.infuehr</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>fpizlo</cc>
    
    <cc>mark.lam</cc>
    
    <cc>saam</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>ysuzuki</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1417108</commentid>
    <comment_count>0</comment_count>
    <who name="Dominik Inführ">dominik.infuehr</who>
    <bug_when>2018-04-24 00:46:25 -0700</bug_when>
    <thetext>Disable usage of fused multiply-add instructions for JSC with compiler flag</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1417112</commentid>
    <comment_count>1</comment_count>
      <attachid>338641</attachid>
    <who name="Dominik Inführ">dominik.infuehr</who>
    <bug_when>2018-04-24 00:59:09 -0700</bug_when>
    <thetext>Created attachment 338641
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1418200</commentid>
    <comment_count>2</comment_count>
      <attachid>338641</attachid>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2018-04-26 13:08:03 -0700</bug_when>
    <thetext>Comment on attachment 338641
Patch

Can you limit the scope of this change? If fused-multiply-add works well, we do not need this flag.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1418207</commentid>
    <comment_count>3</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2018-04-26 13:14:44 -0700</bug_when>
    <thetext>Fused multiply-add gives a precision boost that results in double math returning a result that does not match bit-for-bit what you would have gotten without the fusion. Based on this, I think it might be a good idea to disable it for all of JSC. 

I would definitely want to disable it if it’s free to disable it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1418228</commentid>
    <comment_count>4</comment_count>
    <who name="Yusuke Suzuki">ysuzuki</who>
    <bug_when>2018-04-26 13:53:17 -0700</bug_when>
    <thetext>(In reply to Filip Pizlo from comment #3)
&gt; Fused multiply-add gives a precision boost that results in double math
&gt; returning a result that does not match bit-for-bit what you would have
&gt; gotten without the fusion. Based on this, I think it might be a good idea to
&gt; disable it for all of JSC. 
&gt; 
&gt; I would definitely want to disable it if it’s free to disable it.

Interesting. After considering about this, I think, in JSC, we do not have performance sensitive FMAs (I believe). So disabling is OK.
I&apos;m a bit worried about disabling this in the entire WebKit tree due to,

1. performance reason. If we have a non-result-sensitive performance-sensitive FMAs, this can affect on that (like, implementing some graphic filters)
2. coordination with third party libraries.

what do you think of?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1418233</commentid>
    <comment_count>5</comment_count>
    <who name="Filip Pizlo">fpizlo</who>
    <bug_when>2018-04-26 14:16:26 -0700</bug_when>
    <thetext>(In reply to Yusuke Suzuki from comment #4)
&gt; (In reply to Filip Pizlo from comment #3)
&gt; &gt; Fused multiply-add gives a precision boost that results in double math
&gt; &gt; returning a result that does not match bit-for-bit what you would have
&gt; &gt; gotten without the fusion. Based on this, I think it might be a good idea to
&gt; &gt; disable it for all of JSC. 
&gt; &gt; 
&gt; &gt; I would definitely want to disable it if it’s free to disable it.
&gt; 
&gt; Interesting. After considering about this, I think, in JSC, we do not have
&gt; performance sensitive FMAs (I believe). So disabling is OK.
&gt; I&apos;m a bit worried about disabling this in the entire WebKit tree due to,
&gt; 
&gt; 1. performance reason. If we have a non-result-sensitive
&gt; performance-sensitive FMAs, this can affect on that (like, implementing some
&gt; graphic filters)
&gt; 2. coordination with third party libraries.
&gt; 
&gt; what do you think of?

Sounds like a good reason to only disable fused fma in JSC and leave it elsewhere.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1420070</commentid>
    <comment_count>6</comment_count>
    <who name="Dominik Inführ">dominik.infuehr</who>
    <bug_when>2018-05-03 02:47:25 -0700</bug_when>
    <thetext>The patch was already reviewed, is there anything for me left to do?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1420094</commentid>
    <comment_count>7</comment_count>
      <attachid>338641</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2018-05-03 04:58:55 -0700</bug_when>
    <thetext>Comment on attachment 338641
Patch

Clearing flags on attachment: 338641

Committed r231301: &lt;https://trac.webkit.org/changeset/231301&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1420095</commentid>
    <comment_count>8</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2018-05-03 04:58:57 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1420096</commentid>
    <comment_count>9</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2018-05-03 04:59:20 -0700</bug_when>
    <thetext>&lt;rdar://problem/39938586&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>338641</attachid>
            <date>2018-04-24 00:59:09 -0700</date>
            <delta_ts>2018-05-03 04:58:55 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-184909-20180424095908.patch</filename>
            <type>text/plain</type>
            <size>1696</size>
            <attacher name="Dominik Inführ">dominik.infuehr</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjMwOTExCmRpZmYgLS1naXQgYS9Tb3VyY2UvSmF2YVNjcmlw
dENvcmUvQ2hhbmdlTG9nIGIvU291cmNlL0phdmFTY3JpcHRDb3JlL0NoYW5nZUxvZwppbmRleCA1
MDRhOGFhM2Y0MDVkNjgzMzI2MTFhZDlmN2NkNzY5YjU1N2ZhOGRhLi4xN2ZlM2MxZGM2Mjc0NWEw
ZDkxNzg0OTA2NDQ0M2ZjMTVmNDQ3NWQ5IDEwMDY0NAotLS0gYS9Tb3VyY2UvSmF2YVNjcmlwdENv
cmUvQ2hhbmdlTG9nCisrKyBiL1NvdXJjZS9KYXZhU2NyaXB0Q29yZS9DaGFuZ2VMb2cKQEAgLTEs
MyArMSwxNiBAQAorMjAxOC0wNC0yNCAgRG9taW5payBJbmZ1ZWhyICA8ZGluZnVlaHJAaWdhbGlh
LmNvbT4KKworICAgICAgICBEaXNhYmxlIHVzYWdlIG9mIGZ1c2VkIG11bHRpcGx5LWFkZCBpbnN0
cnVjdGlvbnMgZm9yIEpTQyB3aXRoIGNvbXBpbGVyIGZsYWcKKyAgICAgICAgaHR0cHM6Ly9idWdz
LndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTE4NDkwOQorCisgICAgICAgIFJldmlld2VkIGJ5
IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAgIEFkZHMgLWZmcC1jb250cmFjdCBhcyBjb21waWxl
ciBmbGFnIGZvciBidWlsZGluZyBKU0MuIFRoaXMgZW5zdXJlcyB0aGF0IGZ1bmN0aW9ucworICAg
ICAgICBsaWtlIHBhcnNlSW50KCkgZG8gbm90IHJldHVybi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