<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 - Crash in 'SLP Vectorizer' with wasm32"
   href="https://bugs.llvm.org/show_bug.cgi?id=39168">39168</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Crash in 'SLP Vectorizer' with wasm32
          </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>enhancement
          </td>
        </tr>

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

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

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

        <tr>
          <th>Reporter</th>
          <td>sbc@chromium.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Happens when trying to build compiler-rt in release mode:

```
$
/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/bin/wasm32-clang
 --target=wasm32-unknown-unknown-wasm
--sysroot=/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/sysroot
-DVISIBILITY_HIDDEN  -O3 -DNDEBUG    -std=c11 -fPIC -fno-builtin
-fvisibility=hidden -fomit-frame-pointer -MD -MT
CMakeFiles/clang_rt.builtins-wasm32.dir/multc3.c.o -MF
CMakeFiles/clang_rt.builtins-wasm32.dir/multc3.c.o.d -o
CMakeFiles/clang_rt.builtins-wasm32.dir/multc3.c.o   -c
/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/compiler-rt/lib/builtins/multc3.c
/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/bin/wasm32-clang
--target=wasm32
--sysroot=/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/sysroot
-DVISIBILITY_HIDDEN  -O2 -fno-builtin -o tmp.o  -c
/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/compiler-rt/lib/builtins/multc3.c
__bp_preexec_invoke_exec "$_"
clang-8:
/usr/local/google/home/sbc/dev/wasm/llvm/include/llvm/CodeGen/TargetLowering.h:2296:
virtual bool llvm::TargetLoweringBase::isFAbsFree(llvm::EVT) const: Assertion
`VT.isFloatingPoint()' failed.
Stack dump:
0.      Program arguments:
/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/bin/clang-8
-cc1 -triple wasm32 -emit-obj -disable-free -main-file-name multc3.c
-mrelocation-model static -mthread-model single -masm-verbose
-mconstructor-aliases -fuse-init-array -target-cpu generic -fvisibility hidden
-dwarf-column-info -debugger-tuning=gdb -momit-leaf-frame-pointer
-coverage-notes-file
/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/compiler-rt-out/tmp.gcno
-resource-dir
/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/lib/clang/8.0.0
-D VISIBILITY_HIDDEN -isysroot
/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/sysroot
-internal-isystem
/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/sysroot/include
-O2 -fdebug-compilation-dir
/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/compiler-rt-out
-ferror-limit 19 -fmessage-length 131 -fno-builtin -fobjc-runtime=gnustep
-fno-common -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops
-vectorize-slp -o tmp.o -x c
/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/compiler-rt/lib/builtins/multc3.c 
1.      <eof> parser at end of file
2.      Per-module optimization passes
3.      Running pass 'Function Pass Manager' on module
'/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/compiler-rt/lib/builtins/multc3.c'.
4.      Running pass 'SLP Vectorizer' on function '@__multc3'
#0 0x00007f08f7536654 PrintStackTraceSignalHandler(void*)
(/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/bin/../lib/libLLVMSupport.so.8svn+0x153654)
#1 0x00007f08f75343de llvm::sys::RunSignalHandlers()
(/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/bin/../lib/libLLVMSupport.so.8svn+0x1513de)
#2 0x00007f08f7536812 SignalHandler(int)
(/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/bin/../lib/libLLVMSupport.so.8svn+0x153812)
#3 0x00007f08f6e7d0c0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x110c0)
#4 0x00007f08f5644fcf gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x32fcf)
#5 0x00007f08f56463fa abort (/lib/x86_64-linux-gnu/libc.so.6+0x343fa)
#6 0x00007f08f563de37 (/lib/x86_64-linux-gnu/libc.so.6+0x2be37)
#7 0x00007f08f563dee2 (/lib/x86_64-linux-gnu/libc.so.6+0x2bee2)
#8 0x00007f08f8e8da54 llvm::TargetLoweringBase::isFAbsFree(llvm::EVT) const
(/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/bin/../lib/libLLVMWebAssemblyCodeGen.so.8svn+0x5ba54)
#9 0x00007f08f8ebb81e
llvm::BasicTTIImplBase<llvm::WebAssemblyTTIImpl>::getIntrinsicInstrCost(llvm::Intrinsic::ID,
llvm::Type*, llvm::ArrayRef<llvm::Type*>, llvm::FastMathFlags, unsigned int)
(/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/bin/../lib/libLLVMWebAssemblyCodeGen.so.8svn+0x8981e)
#10 0x00007f08f8bd0db6
llvm::TargetTransformInfo::getIntrinsicInstrCost(llvm::Intrinsic::ID,
llvm::Type*, llvm::ArrayRef<llvm::Type*>, llvm::FastMathFlags, unsigned int)
const
(/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/bin/../lib/libLLVMAnalysis.so.8svn+0x2d2db6)
#11 0x00007f08f713fd44
llvm::slpvectorizer::BoUpSLP::getEntryCost(llvm::slpvectorizer::BoUpSLP::TreeEntry*)
(/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/bin/../lib/libLLVMVectorize.so.8svn+0x7ad44)
#12 0x00007f08f71425dd llvm::slpvectorizer::BoUpSLP::getTreeCost()
(/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/bin/../lib/libLLVMVectorize.so.8svn+0x7d5dd)
#13 0x00007f08f715552d
llvm::SLPVectorizerPass::tryToVectorizeList(llvm::ArrayRef<llvm::Value*>,
llvm::slpvectorizer::BoUpSLP&, int, bool)
(/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/bin/../lib/libLLVMVectorize.so.8svn+0x9052d)
#14 0x00007f08f7151145
llvm::SLPVectorizerPass::vectorizeChainsInBlock(llvm::BasicBlock*,
llvm::slpvectorizer::BoUpSLP&)
(/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/bin/../lib/libLLVMVectorize.so.8svn+0x8c145)
#15 0x00007f08f714fc1c llvm::SLPVectorizerPass::runImpl(llvm::Function&,
llvm::ScalarEvolution*, llvm::TargetTransformInfo*, llvm::TargetLibraryInfo*,
llvm::AAResults*, llvm::LoopInfo*, llvm::DominatorTree*,
llvm::AssumptionCache*, llvm::DemandedBits*, llvm::OptimizationRemarkEmitter*)
(/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/bin/../lib/libLLVMVectorize.so.8svn+0x8ac1c)
#16 0x00007f08f7161eba (anonymous
namespace)::SLPVectorizer::runOnFunction(llvm::Function&)
(/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/bin/../lib/libLLVMVectorize.so.8svn+0x9ceba)
#17 0x00007f08f80eb913 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/bin/../lib/libLLVMCore.so.8svn+0x1d5913)
#18 0x00007f08f80ebc38 llvm::FPPassManager::runOnModule(llvm::Module&)
(/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/bin/../lib/libLLVMCore.so.8svn+0x1d5c38)
#19 0x00007f08f80ec25d llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/bin/../lib/libLLVMCore.so.8svn+0x1d625d)
#20 0x00007f08f6663ddb clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout
const&, llvm::Module*, clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/bin/../lib/libclangCodeGen.so.8svn+0x95ddb)
#21 0x00007f08f68dc0ea
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/bin/../lib/libclangCodeGen.so.8svn+0x30e0ea)
#22 0x00007f08f3ba0b13 clang::ParseAST(clang::Sema&, bool, bool)
(/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/bin/../lib/../lib/libclangParse.so.8svn+0x2eb13)
#23 0x00007f08f63456d0 clang::FrontendAction::Execute()
(/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/bin/../lib/libclangFrontend.so.8svn+0xe96d0)
#24 0x00007f08f62e6ee1
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/bin/../lib/libclangFrontend.so.8svn+0x8aee1)
#25 0x00007f08f62580f6
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/bin/../lib/libclangFrontendTool.so.8svn+0x40f6)
#26 0x000000000041331c cc1_main(llvm::ArrayRef<char const*>, char const*,
void*)
(/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/bin/clang-8+0x41331c)
#27 0x0000000000411445 main
(/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/bin/clang-8+0x411445)
#28 0x00007f08f56322b1 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x202b1)
#29 0x000000000040e63a _start
(/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/bin/clang-8+0x40e63a)
clang-8: error: unable to execute command: Aborted
clang-8: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 8.0.0 (trunk 343611) (llvm/trunk 343522)
Target: wasm32
Thread model: single
InstalledDir:
/usr/local/google/home/sbc/dev/wasm/waterfall/src/work/wasm-install/bin
clang-8: note: diagnostic msg: PLEASE submit a bug report to
<a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash backtrace, preprocessed source,
and associated run script.
clang-8: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-8: note: diagnostic msg: /tmp/multc3-c31976.c
clang-8: note: diagnostic msg: /tmp/multc3-c31976.sh
clang-8: note: diagnostic msg: 

********************

```</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>