[llvm-bugs] [Bug 42727] New: Regression in "[X86] EltsFromConsecutiveLoads - support common source loads"

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jul 23 12:54:24 PDT 2019


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

            Bug ID: 42727
           Summary: Regression in "[X86] EltsFromConsecutiveLoads -
                    support common source loads"
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: martin at martin.st
                CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
                    llvm-dev at redking.me.uk, spatel+llvm at rotateright.com

Created attachment 22274
  --> https://bugs.llvm.org/attachment.cgi?id=22274&action=edit
Repro source

Since SVN r366441, "[X86] EltsFromConsecutiveLoads - support common source
loads", the following compilation fails:

$ clang -target i686-w64-mingw32 -c -O3 -mavx2 simd_cmp_avx2.cpp
clang-10: ../lib/CodeGen/SelectionDAG/SelectionDAG.cpp:7473: llvm::SDNode*
llvm::SelectionDAG::UpdateNodeOperands(llvm::SDNode*, llvm::SDValue,
llvm::SDValue): Assertion `N->getNumOperands() == 2 && "Update with wrong
number of operands"' failed.
Stack dump:
0.      Program arguments: /home/martin/code/llvm-bisect/build/bin/clang-10
-cc1 -triple i686-w64-windows-gnu -emit-obj -disable-free -main-file-name
simd_cmp_avx2.cpp -mrelocation-model static -mthread-model posix
-mframe-pointer=none -fmath-errno -masm-verbose -mconstructor-aliases
-target-cpu pentium4 -target-feature +avx2 -dwarf-column-info
-debugger-tuning=gdb -coverage-notes-file
/home/martin/code/llvm-bisect/build/simd_cmp_avx2.gcno -resource-dir
/home/martin/code/llvm-bisect/build/lib/clang/10.0.0 -internal-isystem
/usr/i686-w64-mingw32/include/c++ -internal-isystem
/usr/i686-w64-mingw32/include/c++/i686-w64-mingw32 -internal-isystem
/usr/i686-w64-mingw32/include/c++/backward -internal-isystem
/usr/i686-w64-mingw32/include/c++/7.3-win32 -internal-isystem
/usr/i686-w64-mingw32/include/c++/7.3-win32/i686-w64-mingw32 -internal-isystem
/usr/i686-w64-mingw32/include/c++/7.3-win32/backward -internal-isystem
/usr/include/c++/7.3-win32 -internal-isystem
/usr/include/c++/7.3-win32/i686-w64-mingw32 -internal-isystem
/usr/include/c++/7.3-win32/backward -internal-isystem
/usr/lib/gcc/i686-w64-mingw32/7.3-win32/include/c++ -internal-isystem
/usr/lib/gcc/i686-w64-mingw32/7.3-win32/include/c++/i686-w64-mingw32
-internal-isystem /usr/lib/gcc/i686-w64-mingw32/7.3-win32/include/c++/backward
-internal-isystem /home/martin/code/llvm-bisect/build/lib/clang/10.0.0/include
-internal-isystem /usr/i686-w64-mingw32/sys-root/mingw/include
-internal-isystem /usr/i686-w64-mingw32/include -internal-isystem /usr/include
-O3 -fdeprecated-macro -fdebug-compilation-dir
/home/martin/code/llvm-bisect/build -ferror-limit 19 -fmessage-length 0
-fno-use-cxa-atexit -fobjc-runtime=gcc -fcxx-exceptions -fexceptions
-fdwarf-exceptions -fdiagnostics-show-option -vectorize-loops -vectorize-slp
-faddrsig -o simd_cmp_avx2.o -x c++ simd_cmp_avx2.cpp 
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'simd_cmp_avx2.cpp'.
4.      Running pass 'X86 DAG->DAG Instruction Selection' on function
'@_ZN14simd_test_avx216c_imm_v256_alignILi1EEE6c_v256S1_S1_'
 #0 0x00005601d4d9df7a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/martin/code/llvm-bisect/build/bin/clang-10+0x1f5df7a)
 #1 0x00005601d4d9bc14 llvm::sys::RunSignalHandlers()
(/home/martin/code/llvm-bisect/build/bin/clang-10+0x1f5bc14)
 #2 0x00005601d4d9bd52 SignalHandler(int)
(/home/martin/code/llvm-bisect/build/bin/clang-10+0x1f5bd52)
 #3 0x00007f33549cd890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
 #4 0x00007f335367ee97 raise
/build/glibc-OTsEL5/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
 #5 0x00007f3353680801 abort /build/glibc-OTsEL5/glibc-2.27/stdlib/abort.c:81:0
 #6 0x00007f335367039a __assert_fail_base
/build/glibc-OTsEL5/glibc-2.27/assert/assert.c:89:0
 #7 0x00007f3353670412 (/lib/x86_64-linux-gnu/libc.so.6+0x30412)
 #8 0x00005601d58de60a llvm::SelectionDAG::UpdateNodeOperands(llvm::SDNode*,
llvm::SDValue, llvm::SDValue)
(/home/martin/code/llvm-bisect/build/bin/clang-10+0x2a9e60a)
 #9 0x00005601d58f8e15
llvm::SelectionDAG::makeEquivalentMemoryOrdering(llvm::LoadSDNode*,
llvm::SDValue) (/home/martin/code/llvm-bisect/build/bin/clang-10+0x2ab8e15)
#10 0x00005601d3f2f69f EltsFromConsecutiveLoads(llvm::EVT,
llvm::ArrayRef<llvm::SDValue>, llvm::SDLoc const&, llvm::SelectionDAG&,
llvm::X86Subtarget const&, bool)::'lambda0'(llvm::EVT,
llvm::LoadSDNode*)::operator()(llvm::EVT, llvm::LoadSDNode*) const
(/home/martin/code/llvm-bisect/build/bin/clang-10+0x10ef69f)
#11 0x00005601d3fa2e73 EltsFromConsecutiveLoads(llvm::EVT,
llvm::ArrayRef<llvm::SDValue>, llvm::SDLoc const&, llvm::SelectionDAG&,
llvm::X86Subtarget const&, bool)
(/home/martin/code/llvm-bisect/build/bin/clang-10+0x1162e73)
#12 0x00005601d3ff59cc
llvm::X86TargetLowering::LowerBUILD_VECTOR(llvm::SDValue, llvm::SelectionDAG&)
const (/home/martin/code/llvm-bisect/build/bin/clang-10+0x11b59cc)
#13 0x00005601d401af58 llvm::X86TargetLowering::LowerOperation(llvm::SDValue,
llvm::SelectionDAG&) const
(/home/martin/code/llvm-bisect/build/bin/clang-10+0x11daf58)
#14 0x00005601d5861471 (anonymous
namespace)::SelectionDAGLegalize::LegalizeOp(llvm::SDNode*) (.part.290)
(/home/martin/code/llvm-bisect/build/bin/clang-10+0x2a21471)
#15 0x00005601d5872823 llvm::SelectionDAG::Legalize()
(/home/martin/code/llvm-bisect/build/bin/clang-10+0x2a32823)
#16 0x00005601d59111fb llvm::SelectionDAGISel::CodeGenAndEmitDAG()
(/home/martin/code/llvm-bisect/build/bin/clang-10+0x2ad11fb)
#17 0x00005601d5915b6b
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
(/home/martin/code/llvm-bisect/build/bin/clang-10+0x2ad5b6b)
#18 0x00005601d59175a2
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(.part.807) (/home/martin/code/llvm-bisect/build/bin/clang-10+0x2ad75a2)
#19 0x00005601d3f29dbf (anonymous
namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(/home/martin/code/llvm-bisect/build/bin/clang-10+0x10e9dbf)
#20 0x00005601d444bbae
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/home/martin/code/llvm-bisect/build/bin/clang-10+0x160bbae)
#21 0x00005601d483f4d9 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/martin/code/llvm-bisect/build/bin/clang-10+0x19ff4d9)
#22 0x00005601d483f5d1 llvm::FPPassManager::runOnModule(llvm::Module&)
(/home/martin/code/llvm-bisect/build/bin/clang-10+0x19ff5d1)
#23 0x00005601d483e731 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/martin/code/llvm-bisect/build/bin/clang-10+0x19fe731)
#24 0x00005601d4fab1fc 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> >)
(/home/martin/code/llvm-bisect/build/bin/clang-10+0x216b1fc)
#25 0x00005601d5a024fd
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/home/martin/code/llvm-bisect/build/bin/clang-10+0x2bc24fd)
#26 0x00005601d6398e89 clang::ParseAST(clang::Sema&, bool, bool)
(/home/martin/code/llvm-bisect/build/bin/clang-10+0x3558e89)
#27 0x00005601d59ffb58 clang::CodeGenAction::ExecuteAction()
(/home/martin/code/llvm-bisect/build/bin/clang-10+0x2bbfb58)
#28 0x00005601d5475139 clang::FrontendAction::Execute()
(/home/martin/code/llvm-bisect/build/bin/clang-10+0x2635139)
#29 0x00005601d54391a1
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/martin/code/llvm-bisect/build/bin/clang-10+0x25f91a1)
#30 0x00005601d552027f
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/martin/code/llvm-bisect/build/bin/clang-10+0x26e027f)
#31 0x00005601d3aabf7f cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/home/martin/code/llvm-bisect/build/bin/clang-10+0xc6bf7f)
#32 0x00005601d3a3f9f9 main
(/home/martin/code/llvm-bisect/build/bin/clang-10+0xbff9f9)
#33 0x00007f3353661b97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#34 0x00005601d3aa770a _start
(/home/martin/code/llvm-bisect/build/bin/clang-10+0xc6770a)

-- 
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/20190723/ff9007a7/attachment.html>


More information about the llvm-bugs mailing list