[llvm-bugs] [Bug 41629] New: X86AvoidStoreForwardingBlocks reaches assertion error

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Apr 27 13:46:43 PDT 2019


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

            Bug ID: 41629
           Summary: X86AvoidStoreForwardingBlocks reaches assertion error
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: vtjnash at gmail.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

Created attachment 21830
  --> https://bugs.llvm.org/attachment.cgi?id=21830&action=edit
broken.ll

For load:
  %45:vr128x = VMOVDQU64Z128rm %stack.3, 1, $noreg, 0, $noreg ::
(dereferenceable load 16 from %ir.18, align 8)

The X86AvoidSFBPass pass fails when it runs into the following store:
  MOV64mr %stack.3, 1, $noreg, 8, $noreg, killed %33:gr64

To reproduce, run the attached script with llc version 7/8/master (e.g. any
version since X86AvoidSFBPass was introduced):

$ llc -fast-isel -O1 -mcpu=skylake-avx512 print_to_string.ll -o /dev/null #
-start-before=isel

llc:
/data/vtjnash/julia/deps/srccache/llvm-svn/lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp:690:
virtual bool
{anonymous}::X86AvoidSFBPass::runOnMachineFunction(llvm::MachineFunction&):
Assertion `PBInst->hasOneMemOperand() && "Expected One Memory Operand"' failed.

Stack dump:
0.      Program arguments:
../deps/scratch/llvm-svn/build_Release+Asserts/bin/llc -fast-isel -O1
-mcpu=skylake-avx512 print_to_string.ll -o /dev/null 
1.      Running pass 'Function Pass Manager' on module 'print_to_string.ll'.
2.      Running pass 'X86 Avoid Store Forwarding Blocks' on function
'@julia_print_to_string_15938'
 #0 0x00007f9c3390118a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/data/vtjnash/julia/deps/scratch/llvm-svn/build_Release+Asserts/bin/../lib/libLLVM-9svn.so+0x85f18a)
 #1 0x00007f9c338ff014 llvm::sys::RunSignalHandlers()
(/data/vtjnash/julia/deps/scratch/llvm-svn/build_Release+Asserts/bin/../lib/libLLVM-9svn.so+0x85d014)
 #2 0x00007f9c338ff152 SignalHandler(int)
(/data/vtjnash/julia/deps/scratch/llvm-svn/build_Release+Asserts/bin/../lib/libLLVM-9svn.so+0x85d152)
 #3 0x00007f9c32973140 (/lib/x86_64-linux-gnu/libc.so.6+0x37140)
 #4 0x00007f9c329730bb raise
/build/glibc-itYbWN/glibc-2.26/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
 #5 0x00007f9c32974f5d abort /build/glibc-itYbWN/glibc-2.26/stdlib/abort.c:92:0
 #6 0x00007f9c3296af17 __assert_fail_base
/build/glibc-itYbWN/glibc-2.26/assert/assert.c:92:0
 #7 0x00007f9c3296afc2 (/lib/x86_64-linux-gnu/libc.so.6+0x2efc2)
 #8 0x00007f9c353f1aa7 (anonymous
namespace)::X86AvoidSFBPass::runOnMachineFunction(llvm::MachineFunction&)
(/data/vtjnash/julia/deps/scratch/llvm-svn/build_Release+Asserts/bin/../lib/libLLVM-9svn.so+0x234faa7)
 #9 0x00007f9c33c71c1e
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/data/vtjnash/julia/deps/scratch/llvm-svn/build_Release+Asserts/bin/../lib/libLLVM-9svn.so+0xbcfc1e)
#10 0x00007f9c33a2d649 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/data/vtjnash/julia/deps/scratch/llvm-svn/build_Release+Asserts/bin/../lib/libLLVM-9svn.so+0x98b649)
#11 0x00007f9c33a2d741 llvm::FPPassManager::runOnModule(llvm::Module&)
(/data/vtjnash/julia/deps/scratch/llvm-svn/build_Release+Asserts/bin/../lib/libLLVM-9svn.so+0x98b741)
#12 0x00007f9c33a2c8a1 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/data/vtjnash/julia/deps/scratch/llvm-svn/build_Release+Asserts/bin/../lib/libLLVM-9svn.so+0x98a8a1)
#13 0x000055fd959425eb main
(../deps/scratch/llvm-svn/build_Release+Asserts/bin/llc+0xf5eb)
#14 0x00007f9c3295d1c1 __libc_start_main
/build/glibc-itYbWN/glibc-2.26/csu/../csu/libc-start.c:342:0
#15 0x000055fd9594305a _start
(../deps/scratch/llvm-svn/build_Release+Asserts/bin/llc+0x1005a)
Aborted

(these files and steps are also at
https://gist.github.com/vtjnash/192cab72a6cfc00256ff118238163b55)

-- 
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/20190427/da3c475b/attachment-0001.html>


More information about the llvm-bugs mailing list