[llvm-bugs] [Bug 42615] New: Regression in "[X86][SSE] LowerScalarImmediateShift - ensure shift amount correctness. NFCI."

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jul 13 13:52:59 PDT 2019


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

            Bug ID: 42615
           Summary: Regression in "[X86][SSE] LowerScalarImmediateShift -
                    ensure shift amount correctness. NFCI."
           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, hans at chromium.org,
                    llvm-bugs at lists.llvm.org, llvm-dev at redking.me.uk,
                    spatel+llvm at rotateright.com

Created attachment 22242
  --> https://bugs.llvm.org/attachment.cgi?id=22242&action=edit
Compressed reproduction sample

Since SVN r365024, "[X86][SSE] LowerScalarImmediateShift - ensure shift amount
correctness. NFCI.", the attached reproduction sample triggers a failed assert:

$ clang -target i686-w64-mingw32 -c -O3 simd_cmp_sse2-preproc.cpp
clang-9: ../lib/Target/X86/X86ISelLowering.cpp:25026: llvm::SDValue
LowerScalarImmediateShift(llvm::SDValue, llvm::SelectionDAG&, const
llvm::X86Subtarget&): Assertion `APIntShiftAmt.ult(VT.getScalarSizeInBits()) &&
"Out of range shift amount"' failed.
Stack dump:
0.      Program arguments: /home/martin/code/llvm-bisect/build/bin/clang-9 -cc1
-triple i686-w64-windows-gnu -emit-obj -disable-free -main-file-name
simd_cmp_sse2-preproc.cpp -mrelocation-model static -mthread-model posix
-fmath-errno -masm-verbose -mconstructor-aliases -target-cpu pentium4
-dwarf-column-info -debugger-tuning=gdb -coverage-notes-file
/home/martin/code/llvm-bisect/build/simd_cmp_sse2-preproc.gcno -resource-dir
/home/martin/code/llvm-bisect/build/lib/clang/9.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/9.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 -fcolor-diagnostics
-vectorize-loops -vectorize-slp -faddrsig -o simd_cmp_sse2-preproc.o -x c++
simd_cmp_sse2-preproc.cpp 
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module
'simd_cmp_sse2-preproc.cpp'.
4.      Running pass 'X86 DAG->DAG Instruction Selection' on function
'@_ZL14c_v256_ziplo_86c_v256S_'
 #0 0x0000561425c23e7a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/martin/code/llvm-bisect/build/bin/clang-9+0x1f45e7a)
 #1 0x0000561425c21b14 llvm::sys::RunSignalHandlers()
(/home/martin/code/llvm-bisect/build/bin/clang-9+0x1f43b14)
 #2 0x0000561425c21c52 SignalHandler(int)
(/home/martin/code/llvm-bisect/build/bin/clang-9+0x1f43c52)
 #3 0x00007f0a58679890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
 #4 0x00007f0a5732ae97 raise
/build/glibc-OTsEL5/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
 #5 0x00007f0a5732c801 abort /build/glibc-OTsEL5/glibc-2.27/stdlib/abort.c:81:0
 #6 0x00007f0a5731c39a __assert_fail_base
/build/glibc-OTsEL5/glibc-2.27/assert/assert.c:89:0
 #7 0x00007f0a5731c412 (/lib/x86_64-linux-gnu/libc.so.6+0x30412)
 #8 0x0000561424e6ab09 LowerShift(llvm::SDValue, llvm::X86Subtarget const&,
llvm::SelectionDAG&)
(/home/martin/code/llvm-bisect/build/bin/clang-9+0x118cb09)
 #9 0x0000561424ea92cd llvm::X86TargetLowering::LowerOperation(llvm::SDValue,
llvm::SelectionDAG&) const
(/home/martin/code/llvm-bisect/build/bin/clang-9+0x11cb2cd)
#10 0x00005614267e94a1 (anonymous
namespace)::VectorLegalizer::LegalizeOp(llvm::SDValue)
(/home/martin/code/llvm-bisect/build/bin/clang-9+0x2b0b4a1)
#11 0x00005614267e909e (anonymous
namespace)::VectorLegalizer::LegalizeOp(llvm::SDValue)
(/home/martin/code/llvm-bisect/build/bin/clang-9+0x2b0b09e)
#12 0x00005614267e9763 (anonymous
namespace)::VectorLegalizer::LegalizeOp(llvm::SDValue)
(/home/martin/code/llvm-bisect/build/bin/clang-9+0x2b0b763)
#13 0x00005614267eb983 llvm::SelectionDAG::LegalizeVectors()
(/home/martin/code/llvm-bisect/build/bin/clang-9+0x2b0d983)
#14 0x0000561426794c61 llvm::SelectionDAGISel::CodeGenAndEmitDAG()
(/home/martin/code/llvm-bisect/build/bin/clang-9+0x2ab6c61)
#15 0x000056142679976b
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
(/home/martin/code/llvm-bisect/build/bin/clang-9+0x2abb76b)
#16 0x000056142679b1a2
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(.part.807) (/home/martin/code/llvm-bisect/build/bin/clang-9+0x2abd1a2)
#17 0x0000561424db98bf (anonymous
namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(/home/martin/code/llvm-bisect/build/bin/clang-9+0x10db8bf)
#18 0x00005614252d9bbe
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/home/martin/code/llvm-bisect/build/bin/clang-9+0x15fbbbe)
#19 0x00005614256cc9b9 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/martin/code/llvm-bisect/build/bin/clang-9+0x19ee9b9)
#20 0x00005614256ccab1 llvm::FPPassManager::runOnModule(llvm::Module&)
(/home/martin/code/llvm-bisect/build/bin/clang-9+0x19eeab1)
#21 0x00005614256cbc11 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/martin/code/llvm-bisect/build/bin/clang-9+0x19edc11)
#22 0x0000561425e3401e 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-9+0x215601e)
#23 0x00005614268838ad
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/home/martin/code/llvm-bisect/build/bin/clang-9+0x2ba58ad)
#24 0x0000561427218eb9 clang::ParseAST(clang::Sema&, bool, bool)
(/home/martin/code/llvm-bisect/build/bin/clang-9+0x353aeb9)
#25 0x0000561426880f18 clang::CodeGenAction::ExecuteAction()
(/home/martin/code/llvm-bisect/build/bin/clang-9+0x2ba2f18)
#26 0x00005614262fbb79 clang::FrontendAction::Execute()
(/home/martin/code/llvm-bisect/build/bin/clang-9+0x261db79)
#27 0x00005614262bfd61
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/martin/code/llvm-bisect/build/bin/clang-9+0x25e1d61)
#28 0x00005614263a6c9f
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/martin/code/llvm-bisect/build/bin/clang-9+0x26c8c9f)
#29 0x000056142494422f cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/home/martin/code/llvm-bisect/build/bin/clang-9+0xc6622f)
#30 0x00005614248d8e99 main
(/home/martin/code/llvm-bisect/build/bin/clang-9+0xbfae99)
#31 0x00007f0a5730db97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#32 0x000056142493f9ba _start
(/home/martin/code/llvm-bisect/build/bin/clang-9+0xc619ba)

-- 
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/20190713/aa4beb2b/attachment.html>


More information about the llvm-bugs mailing list