[llvm-bugs] [Bug 37430] New: [AVX512] Crash in LiveVariables

via llvm-bugs llvm-bugs at lists.llvm.org
Fri May 11 16:11:59 PDT 2018


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

            Bug ID: 37430
           Summary: [AVX512] Crash in LiveVariables
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: keno at alumni.harvard.edu
                CC: craig.topper at gmail.com, guy.blank at intel.com,
                    llvm-bugs at lists.llvm.org

Consider the following bugpoint-reduced IR:
```
define void @"julia_#3_33548"() {
top:
  br i1 undef, label %L19, label %L15

L15:                                              ; preds = %top
  %tmp47 = fcmp une float 0.000000e+00, undef
  %tmp48 = zext i1 %tmp47 to i8
  br label %L21

L19:                                              ; preds = %top
  br label %L21

L21:                                              ; preds = %L19, %L15
  %.sroa.0.0 = phi i8 [ undef, %L19 ], [ %tmp48, %L15 ]
  store i8 %.sroa.0.0, i8* undef, align 1
  ret void
}
```
Running llc on this input causes a crash in LiveVariables:
```
../llvm-build-debug/bin/llc -mcpu=skylake-avx512 bugpoint-reduced-simplified.ll
Stack dump:
0.      Program arguments: ../llvm-build-debug/bin/llc -mcpu=skylake-avx512
bugpoint-reduced-simplified.ll
1.      Running pass 'Function Pass Manager' on module
'bugpoint-reduced-simplified.ll'.
2.      Running pass 'Live Variable Analysis' on function '@"julia_#3_33548"'
#0 0x000055a23f062d3d llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/keno/llvm/lib/Support/Unix/Signals.inc:399:0
#1 0x000055a23f062dd0 PrintStackTraceSignalHandler(void*)
/home/keno/llvm/lib/Support/Unix/Signals.inc:463:0
#2 0x000055a23f060fa5 llvm::sys::RunSignalHandlers()
/home/keno/llvm/lib/Support/Signals.cpp:49:0
#3 0x000055a23f0625a9 SignalHandler(int)
/home/keno/llvm/lib/Support/Unix/Signals.inc:253:0
#4 0x00007f488af32150 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x13150)
#5 0x000055a23cc1e43a llvm::MachineInstr::getParent()
/home/keno/llvm/include/llvm/CodeGen/MachineInstr.h:157:0
#6 0x000055a23e31b126 llvm::LiveVariables::runOnBlock(llvm::MachineBasicBlock*,
unsigned int) /home/keno/llvm/lib/CodeGen/LiveVariables.cpp:596:0
#7 0x000055a23e31b6c4
llvm::LiveVariables::runOnMachineFunction(llvm::MachineFunction&)
/home/keno/llvm/lib/CodeGen/LiveVariables.cpp:651:0
#8 0x000055a23e3a9b7f llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
/home/keno/llvm/lib/CodeGen/MachineFunctionPass.cpp:62:0
#9 0x000055a23e8601f2 llvm::FPPassManager::runOnFunction(llvm::Function&)
/home/keno/llvm/lib/IR/LegacyPassManager.cpp:1520:0
#10 0x000055a23e860397 llvm::FPPassManager::runOnModule(llvm::Module&)
/home/keno/llvm/lib/IR/LegacyPassManager.cpp:1541:0
#11 0x000055a23e86071f (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
/home/keno/llvm/lib/IR/LegacyPassManager.cpp:1597:0
#12 0x000055a23e860e49 llvm::legacy::PassManagerImpl::run(llvm::Module&)
/home/keno/llvm/lib/IR/LegacyPassManager.cpp:1700:0
#13 0x000055a23e861041 llvm::legacy::PassManager::run(llvm::Module&)
/home/keno/llvm/lib/IR/LegacyPassManager.cpp:1732:0
#14 0x000055a23cbe3a76 compileModule(char**, llvm::LLVMContext&)
/home/keno/llvm/tools/llc/llc.cpp:575:0
#15 0x000055a23cbe21b3 main /home/keno/llvm/tools/llc/llc.cpp:345:0
#16 0x00007f4889e4c1c1 __libc_start_main
/build/glibc-itYbWN/glibc-2.26/csu/../csu/libc-start.c:342:0
#17 0x000055a23cbdff1a _start (../llvm-build-debug/bin/llc+0x1187f1a)
```
Cursory debugging suggests an IMPLICIT_DEF node is getting removed by the X86
Domain Reassignment pass when it shouldn't be. 

Reduced from Julia bug https://github.com/JuliaLang/julia/issues/27080.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180511/6c91012b/attachment.html>


More information about the llvm-bugs mailing list