[llvm-bugs] [Bug 27873] New: ICE in llvm::TargetLowering::SimplifyDemandedBits on knl.

via llvm-bugs llvm-bugs at lists.llvm.org
Wed May 25 04:23:50 PDT 2016


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

            Bug ID: 27873
           Summary: ICE in llvm::TargetLowering::SimplifyDemandedBits on
                    knl.
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: Vsevolod.Livinskij at frtk.ru
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 16413
  --> https://llvm.org/bugs/attachment.cgi?id=16413&action=edit
Reproducer.

ICE in llvm::TargetLowering::SimplifyDemandedBits with -O1 -march=knl.

Error:
>  clang++ -O1 -march=knl func.cpp

clang-3.9:
/export/users/vlivinsk/llvm/llvm-trunk/lib/CodeGen/SelectionDAG/TargetLowering.cpp:433:
bool llvm::TargetLowering::SimplifyDemandedBits(llvm::SDValue, const
llvm::APInt&, llvm::APInt&, llvm::APInt&,
llvm::TargetLowering::TargetLoweringOpt&, unsigned int) const: Assertion
`Op.getValueType().getScalarType().getSizeInBits() == BitWidth && "Mask size
mismatches value type size!"' failed.
#0 0x0000000001285c15 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/export/users/vlivinsk/llvm/bin-trunk/bin/clang-3.9+0x1285c15)
#1 0x0000000001283976 llvm::sys::RunSignalHandlers()
(/export/users/vlivinsk/llvm/bin-trunk/bin/clang-3.9+0x1283976)
#2 0x0000000001283b8a SignalHandler(int)
(/export/users/vlivinsk/llvm/bin-trunk/bin/clang-3.9+0x1283b8a)
#3 0x00007f4aa7c379f0 __restore_rt (/lib64/libpthread.so.0+0x109f0)
#4 0x00007f4aa6de9a98 __GI_raise (/lib64/libc.so.6+0x34a98)
#5 0x00007f4aa6deb69a __GI_abort (/lib64/libc.so.6+0x3669a)
#6 0x00007f4aa6de2227 __assert_fail_base (/lib64/libc.so.6+0x2d227)
#7 0x00007f4aa6de22d2 (/lib64/libc.so.6+0x2d2d2)
#8 0x000000000191e9d3 llvm::TargetLowering::SimplifyDemandedBits(llvm::SDValue,
llvm::APInt const&, llvm::APInt&, llvm::APInt&,
llvm::TargetLowering::TargetLoweringOpt&, unsigned int) const
(/export/users/vlivinsk/llvm/bin-trunk/bin/clang-3.9+0x191e9d3)
#9 0x000000000191a9b7 llvm::TargetLowering::SimplifyDemandedBits(llvm::SDValue,
llvm::APInt const&, llvm::APInt&, llvm::APInt&,
llvm::TargetLowering::TargetLoweringOpt&, unsigned int) const
(/export/users/vlivinsk/llvm/bin-trunk/bin/clang-3.9+0x191a9b7)
#10 0x00000000017d48fa (anonymous
namespace)::DAGCombiner::SimplifyDemandedBits(llvm::SDValue, llvm::APInt
const&) (/export/users/vlivinsk/llvm/bin-trunk/bin/clang-3.9+0x17d48fa)
#11 0x00000000017d53e9 (anonymous
namespace)::DAGCombiner::SimplifyDemandedBits(llvm::SDValue)
(/export/users/vlivinsk/llvm/bin-trunk/bin/clang-3.9+0x17d53e9)
#12 0x00000000017f6c3f (anonymous
namespace)::DAGCombiner::visitXOR(llvm::SDNode*)
(/export/users/vlivinsk/llvm/bin-trunk/bin/clang-3.9+0x17f6c3f)
#13 0x000000000181a9bb (anonymous namespace)::DAGCombiner::visit(llvm::SDNode*)
(/export/users/vlivinsk/llvm/bin-trunk/bin/clang-3.9+0x181a9bb)
#14 0x000000000181c05c (anonymous
namespace)::DAGCombiner::combine(llvm::SDNode*)
(/export/users/vlivinsk/llvm/bin-trunk/bin/clang-3.9+0x181c05c)
#15 0x000000000181e4dc llvm::SelectionDAG::Combine(llvm::CombineLevel,
llvm::AAResults&, llvm::CodeGenOpt::Level)
(/export/users/vlivinsk/llvm/bin-trunk/bin/clang-3.9+0x181e4dc)
#16 0x00000000018ee7df llvm::SelectionDAGISel::CodeGenAndEmitDAG()
(/export/users/vlivinsk/llvm/bin-trunk/bin/clang-3.9+0x18ee7df)
#17 0x00000000018f8132
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
(/export/users/vlivinsk/llvm/bin-trunk/bin/clang-3.9+0x18f8132)
#18 0x00000000018fa5e0
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(/export/users/vlivinsk/llvm/bin-trunk/bin/clang-3.9+0x18fa5e0)
#19 0x0000000000911274 (anonymous
namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(/export/users/vlivinsk/llvm/bin-trunk/bin/clang-3.9+0x911274)
#20 0x0000000000c47e05
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/export/users/vlivinsk/llvm/bin-trunk/bin/clang-3.9+0xc47e05)
#21 0x0000000000ef0193 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/export/users/vlivinsk/llvm/bin-trunk/bin/clang-3.9+0xef0193)
#22 0x0000000000ef059b llvm::FPPassManager::runOnModule(llvm::Module&)
(/export/users/vlivinsk/llvm/bin-trunk/bin/clang-3.9+0xef059b)
#23 0x0000000000eefcdd llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/export/users/vlivinsk/llvm/bin-trunk/bin/clang-3.9+0xeefcdd)
#24 0x00000000013cba73 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions
const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction,
llvm::raw_pwrite_stream*)
(/export/users/vlivinsk/llvm/bin-trunk/bin/clang-3.9+0x13cba73)
#25 0x00000000019ca6e4
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/export/users/vlivinsk/llvm/bin-trunk/bin/clang-3.9+0x19ca6e4)
#26 0x0000000001cdb55a clang::ParseAST(clang::Sema&, bool, bool)
(/export/users/vlivinsk/llvm/bin-trunk/bin/clang-3.9+0x1cdb55a)
#27 0x00000000019cac67 clang::CodeGenAction::ExecuteAction()
(/export/users/vlivinsk/llvm/bin-trunk/bin/clang-3.9+0x19cac67)
#28 0x00000000016cf506 clang::FrontendAction::Execute()
(/export/users/vlivinsk/llvm/bin-trunk/bin/clang-3.9+0x16cf506)
#29 0x00000000016a42e6
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/export/users/vlivinsk/llvm/bin-trunk/bin/clang-3.9+0x16a42e6)
#30 0x0000000001753257
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/export/users/vlivinsk/llvm/bin-trunk/bin/clang-3.9+0x1753257)
#31 0x00000000008395f0 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/export/users/vlivinsk/llvm/bin-trunk/bin/clang-3.9+0x8395f0)
#32 0x0000000000807cf0 main
(/export/users/vlivinsk/llvm/bin-trunk/bin/clang-3.9+0x807cf0)
#33 0x00007f4aa6dd5580 __libc_start_main (/lib64/libc.so.6+0x20580)
#34 0x0000000000836069 _start
(/export/users/vlivinsk/llvm/bin-trunk/bin/clang-3.9+0x836069)
Stack dump:
0.      Program arguments: /export/users/vlivinsk/llvm/bin-trunk/bin/clang-3.9
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
func.cpp -mrelocation-model static -mthread-model posix -fmath-errno
-masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array
-target-cpu knl -momit-leaf-frame-pointer -dwarf-column-info
-debugger-tuning=gdb -resource-dir
/export/users/vlivinsk/llvm/bin-trunk/bin/../lib/clang/3.9.0 -internal-isystem
/usr/lib/gcc/x86_64-redhat-linux/5.3.1/../../../../include/c++/5.3.1
-internal-isystem
/usr/lib/gcc/x86_64-redhat-linux/5.3.1/../../../../include/c++/5.3.1/x86_64-redhat-linux
-internal-isystem
/usr/lib/gcc/x86_64-redhat-linux/5.3.1/../../../../include/c++/5.3.1/backward
-internal-isystem /usr/local/include -internal-isystem
/export/users/vlivinsk/llvm/bin-trunk/bin/../lib/clang/3.9.0/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O1
-fdeprecated-macro -fdebug-compilation-dir
/export/users/vlivinsk/dpd_tpi_randloop-randloop/found/clang/crash/S_615022346/reduce
-ferror-limit 19 -fmessage-length 189 -fobjc-runtime=gcc -fcxx-exceptions
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o
/tmp/func-c24a0e.o -x c++ func.cpp
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'func.cpp'.
4.      Running pass 'X86 DAG->DAG Instruction Selection' on function
'@_Z3fn1v'
clang-3.9: error: unable to execute command: Aborted (core dumped)
clang-3.9: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.9.0 (trunk 270677)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /export/users/vlivinsk/llvm/bin-trunk/bin

LLVM version:
clang version 3.9.0 (trunk 270677)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /export/users/vlivinsk/llvm/bin-trunk/bin
Found candidate GCC installation: /usr/lib/gcc/i686-redhat-linux/5.3.1
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/5.3.1
Selected GCC installation: /usr/lib/gcc/x86_64-redhat-linux/5.3.1
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64

-- 
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/20160525/f09136b0/attachment-0001.html>


More information about the llvm-bugs mailing list