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

            Bug ID: 36642
           Summary: nnan flags not propagated by DAG legalizer f?
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: Backend: ARM
          Assignee: unassignedb...@nondot.org
          Reporter: sabua...@codeaurora.org
                CC: llvm-bugs@lists.llvm.org

Created attachment 20017
  --> https://bugs.llvm.org/attachment.cgi?id=20017&action=edit
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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to