<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - nnan flags not propagated by DAG legalizer f?"
   href="https://bugs.llvm.org/show_bug.cgi?id=36642">36642</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>nnan flags not propagated by DAG legalizer f?
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>release blocker
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Backend: ARM
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>sabuasal@codeaurora.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=20017" name="attach_20017" title="Test case, run with llc nnan.ll">attachment 20017</a> <a href="attachment.cgi?id=20017&action=edit" title="Test case, run with llc nnan.ll">[details]</a></span>
Test case, run with llc nnan.ll

the attached test case has three calls to the
"llvm.experimental.vector.reduce.fmax.*"  intrinsic.

Calling the v2f64 versoin runs fine, however calling the wider versions (v4 and
v8) is crashing with the stack trace:

/Target/AArch64/AArch64ISelLowering.cpp:7371: llvm::SDValue
llvm::AArch64TargetLowering::LowerVECREDUCE(llvm::SDValue, llvm::SelectionDAG
&) const: Assertion `Op->getFlags().hasNoNaNs() && "fmax vector reduction needs
NoNaN flag"' failed.
LLVMSymbolizer: error reading file: No such file or directory
#0 0x0000000002459669 (llc+0x2459669)
#1 0x0000000002459889 (llc+0x2459889)
#2 0x0000000002456a07 (llc+0x2456a07)
#3 0x0000000002459c10 (llc+0x2459c10)
#4 0x00007f55665fd330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#5 0x00007f5564feac37 gsignal
/build/eglibc-SvCtMH/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#6 0x00007f5564fee028 abort
/build/eglibc-SvCtMH/eglibc-2.19/stdlib/abort.c:91:0
#7 0x00007f5564fe3bf6 __assert_fail_base
/build/eglibc-SvCtMH/eglibc-2.19/assert/assert.c:92:0
#8 0x00007f5564fe3ca2 (/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
#9 0x0000000000bbbb82 (llc+0xbbbb82)
#10 0x0000000000baa9d3 (llc+0xbaa9d3)
#11 0x000000000208f2fc (llc+0x208f2fc)
#12 0x000000000208dbac (llc+0x208dbac)
#13 0x00000000021f5eb9 (llc+0x21f5eb9)
#14 0x00000000021f3af0 (llc+0x21f3af0)
#15 0x00000000021f371c (llc+0x21f371c)
#16 0x00000000021efbed (llc+0x21efbed)
#17 0x0000000000b759c8 (llc+0xb759c8)
#18 0x000000000141a7d1 (llc+0x141a7d1)
#19 0x0000000001a156ef (llc+0x1a156ef)
#20 0x0000000001a15a05 (llc+0x1a15a05)
#21 0x0000000001a16623 (llc+0x1a16623)
#22 0x0000000001a15cc6 (llc+0x1a15cc6)
#23 0x0000000001a17121 (llc+0x1a17121)
#24 0x000000000075485d (llc+0x75485d)
#25 0x000000000074faae (llc+0x74faae)
#26 0x00007f5564fd5f45 __libc_start_main
/build/eglibc-SvCtMH/eglibc-2.19/csu/libc-start.c:321:0
#27 0x000000000074e3b9 (llc+0x74e3b9)
Stack dump:

The suspected reason is that the fast math flags on the call to the intrinsic
are not getting propagated when the instrinsic is broken down to smaller sizes
causing the assertion to hit.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>