<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 - Regression in "[X86][SSE] LowerScalarImmediateShift - ensure shift amount correctness. NFCI.""
href="https://bugs.llvm.org/show_bug.cgi?id=42615">42615</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Regression in "[X86][SSE] LowerScalarImmediateShift - ensure shift amount correctness. NFCI."
</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>All
</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: X86
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>martin@martin.st
</td>
</tr>
<tr>
<th>CC</th>
<td>craig.topper@gmail.com, hans@chromium.org, llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk, spatel+llvm@rotateright.com
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=22242" name="attach_22242" title="Compressed reproduction sample">attachment 22242</a> <a href="attachment.cgi?id=22242&action=edit" title="Compressed reproduction sample">[details]</a></span>
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)</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>