[llvm-bugs] [Bug 32415] New: Crash in llvm::InstCombiner::Descale
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Mar 24 15:26:21 PDT 2017
http://bugs.llvm.org/show_bug.cgi?id=32415
Bug ID: 32415
Summary: Crash in llvm::InstCombiner::Descale
Product: new-bugs
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: pzheng at codeaurora.org
CC: llvm-bugs at lists.llvm.org
Created attachment 18168
--> http://bugs.llvm.org/attachment.cgi?id=18168&action=edit
reduced test-case simplified.ll
The AOSP builder
(http://lab.llvm.org:8011/builders/aosp-O3-polly-before-vectorizer-unprofitable)
is catching this crash when Polly is turned on (-O3 -mllvm -polly -mllvm
-polly-position=before-vectorizer -mllvm -polly-process-unprofitable). If
"-mllvm -polly-process-unprofitable" is removed from the flags, the compiler
will not crash.
Use the following command to reproduce the crash:
clang -fno-exceptions -ffunction-sections -fdata-sections -funwind-tables
-fstack-protector-strong -Wa,--noexecstack -fno-short-enums
-no-canonical-prefixes -g -fmessage-length=0 -W
-fdebug-prefix-map=/proc/self/cwd= -fcolor-diagnostics -nostdlibinc
-msoft-float -mfloat-abi=softfp -mfpu=neon -mcpu=cortex-a7 -target
arm-linux-androideabi -std=gnu99 -mthumb -fomit-frame-pointer
-fno-strict-aliasing -fno-math-errno -fPIC -O3 -mllvm -polly -mllvm
-polly-position=before-vectorizer -mllvm -polly-process-unprofitable -c
simplified.ll
Here is the error extracted from the build log
(http://lab.llvm.org:8011/builders/aosp-O3-polly-before-vectorizer-unprofitable/builds/65/steps/build-aosp/logs/stdio):
clang:
/var/lib/buildbot/slaves/hexagon-build-03/aosp/llvm.src/lib/Transforms/InstCombine/InstructionCombining.cpp:1054:
llvm::Value *llvm::InstCombiner::Descale(llvm::Value *, llvm::APInt, bool &):
Assertion `isa<IntegerType>(Val->getType()) && "Can only descale integers!"'
failed.
#0 0x00000000014258c4 PrintStackTraceSignalHandler(void*)
(llvm.inst/bin/clang+0x14258c4)
#1 0x0000000001425bd6 SignalHandler(int) (llvm.inst/bin/clang+0x1425bd6)
#2 0x00007fe2c94aad10 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10d10)
#3 0x00007fe2c8088267 gsignal
/build/buildd/glibc-2.21/signal/../sysdeps/unix/sysv/linux/raise.c:55:0
#4 0x00007fe2c8089eca abort /build/buildd/glibc-2.21/stdlib/abort.c:91:0
#5 0x00007fe2c808103d __assert_fail_base
/build/buildd/glibc-2.21/assert/assert.c:92:0
#6 0x00007fe2c80810f2 (/lib/x86_64-linux-gnu/libc.so.6+0x2e0f2)
#7 0x00000000010c44ef llvm::InstCombiner::Descale(llvm::Value*, llvm::APInt,
bool&) (llvm.inst/bin/clang+0x10c44ef)
#8 0x00000000010c74a2
llvm::InstCombiner::visitGetElementPtrInst(llvm::GetElementPtrInst&)
(llvm.inst/bin/clang+0x10c74a2)
#9 0x00000000010cd76b llvm::InstCombiner::run() (llvm.inst/bin/clang+0x10cd76b)
#10 0x00000000010cf541 combineInstructionsOverFunction(llvm::Function&,
llvm::InstCombineWorklist&, llvm::AAResults*, llvm::AssumptionCache&,
llvm::TargetLibraryInfo&, llvm::DominatorTree&, bool, llvm::LoopInfo*)
(llvm.inst/bin/clang+0x10cf541)
#11 0x00000000010cfb6e
llvm::InstructionCombiningPass::runOnFunction(llvm::Function&)
(llvm.inst/bin/clang+0x10cfb6e)
#12 0x0000000000ffa9d4 llvm::FPPassManager::runOnFunction(llvm::Function&)
(llvm.inst/bin/clang+0xffa9d4)
#13 0x0000000000ffac23 llvm::FPPassManager::runOnModule(llvm::Module&)
(llvm.inst/bin/clang+0xffac23)
#14 0x0000000000ffb115 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(llvm.inst/bin/clang+0xffb115)
#15 0x00000000015c58ca 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> >) (llvm.inst/bin/clang+0x15c58ca)
#16 0x0000000001d77b10
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(llvm.inst/bin/clang+0x1d77b10)
#17 0x0000000002259d55 clang::ParseAST(clang::Sema&, bool, bool)
(llvm.inst/bin/clang+0x2259d55)
#18 0x000000000197a0d8 clang::FrontendAction::Execute()
(llvm.inst/bin/clang+0x197a0d8)
#19 0x000000000193eb21
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(llvm.inst/bin/clang+0x193eb21)
#20 0x0000000001a052a8
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(llvm.inst/bin/clang+0x1a052a8)
#21 0x00000000007d834d cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (llvm.inst/bin/clang+0x7d834d)
#22 0x00000000007d696a main (llvm.inst/bin/clang+0x7d696a)
#23 0x00007fe2c8073a40 __libc_start_main
/build/buildd/glibc-2.21/csu/libc-start.c:323:0
#24 0x00000000007d36a9 _start (llvm.inst/bin/clang+0x7d36a9)
Stack dump:
0. Program arguments: llvm.inst/bin/clang -cc1 -triple
thumbv7--linux-android -emit-obj -mnoexecstack -disable-free -main-file-name
celt_decoder.c -mrelocation-model pic -pic-level 2 -mthread-model posix
-relaxed-aliasing -masm-verbose -mconstructor-aliases -munwind-tables
-fuse-init-array -target-cpu cortex-a7 -target-feature +soft-float-abi
-target-feature -fp-only-sp -target-feature -d16 -target-feature +vfp3
-target-feature -fp16 -target-feature -vfp4 -target-feature -fp-armv8
-target-feature +neon -target-feature -crypto -target-abi aapcs-linux
-mfloat-abi soft -dwarf-column-info -debug-info-kind=limited -dwarf-version=4
-debugger-tuning=gdb -ffunction-sections -fdata-sections -coverage-notes-file
/var/lib/buildbot/slaves/hexagon-build-03/aosp/out/target/product/angler/obj_arm/SHARED_LIBRARIES/libopus_intermediates/celt/celt_decoder.gcno
-nostdsysteminc -resource-dir llvm.inst/lib/clang/5.0.0 -dependency-file
out/target/product/angler/obj_arm/SHARED_LIBRARIES/libopus_intermediates/celt/celt_decoder.d
-MT
out/target/product/angler/obj_arm/SHARED_LIBRARIES/libopus_intermediates/celt/celt_decoder.o
-sys-header-deps -isystem frameworks/av/include -isystem
out/target/product/angler/obj/include -isystem
device/huawei/angler/kernel-headers -isystem
hardware/qcom/msm8994/kernel-headers -isystem bionic/libc/arch-arm/include
-isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem
bionic/libc/kernel/uapi/asm-arm -isystem bionic/libc/kernel/android/uapi -I
external/libopus/include -I external/libopus/src -I external/libopus/silk -I
external/libopus/celt -I external/libopus/silk/fixed -I external/libogg/include
-I external/libopus -I
out/target/product/angler/obj_arm/SHARED_LIBRARIES/libopus_intermediates -I
out/target/product/angler/gen/SHARED_LIBRARIES/libopus_intermediates -I
libnativehelper/include/nativehelper -I external/libcxx/include -I
external/libcxxabi/include -I system/core/include -I system/media/audio/include
-I hardware/libhardware/include -I hardware/libhardware_legacy/include -I
hardware/ril/include -I libnativehelper/include -I frameworks/native/include -I
frameworks/native/opengl/include -D _FORTIFY_SOURCE=2 -D NDEBUG -D ANDROID -D
NDEBUG -U DEBUG -D __compiler_offsetof=__builtin_offsetof -D
__ARM_FEATURE_LPAE=1 -D NULL=0 -D SOCKLEN_T=socklen_t -D LOCALE_NOT_USED -D
_LARGEFILE_SOURCE=1 -D _FILE_OFFSET_BITS=64 -D restrict= -D __EMX__ -D
OPUS_BUILD -D FIXED_POINT -D USE_ALLOCA -D HAVE_LRINT -D HAVE_LRINTF -D
OPUS_ARM_ASM -D OPUS_ARM_INLINE_ASM -D OPUS_ARM_MAY_HAVE_EDSP -D
OPUS_ARM_INLINE_EDSP -D OPUS_ARM_MAY_HAVE_MEDIA -D OPUS_ARM_INLINE_MEDIA -D
OPUS_HAVE_RTCD -D OPUS_ARM_MAY_HAVE_NEON -D OPUS_ARM_MAY_HAVE_NEON_INTR -D
OPUS_ARM_PRESUME_NEON -D OPUS_ARM_INLINE_NEON -D _USING_LIBCXX
-internal-isystem llvm.inst/lib/clang/5.0.0/include -O3 -Wno-multichar
-Werror=format-security -Wstrict-aliasing=2 -W -Wall -Wno-unused -Winit-self
-Wpointer-arith -Werror=int-conversion -Wno-reserved-id-macro
-Wno-format-pedantic -Wno-unused-command-line-argument
-Wno-expansion-to-defined -Werror=return-type -Werror=non-virtual-dtor
-Werror=address -Werror=sequence-point -Werror=date-time
-Werror=int-to-pointer-cast -Werror=pointer-to-int-cast
-Werror=address-of-temporary -Werror=return-type -Wno-error -std=gnu99
-fdebug-compilation-dir /var/lib/buildbot/slaves/hexagon-build-03/aosp
-fdebug-prefix-map=/proc/self/cwd= -ferror-limit 19 -fmessage-length 0
-femulated-tls -stack-protector 2 -fallow-half-arguments-and-returns
-fno-signed-char -fobjc-runtime=gcc -fdiagnostics-show-option
-fcolor-diagnostics -vectorize-loops -vectorize-slp -mllvm -polly -mllvm
-polly-position=before-vectorizer -mllvm -polly-process-unprofitable -o
out/target/product/angler/obj_arm/SHARED_LIBRARIES/libopus_intermediates/celt/celt_decoder.o
-x c external/libopus/celt/celt_decoder.c
1. <eof> parser at end of file
2. Per-module optimization passes
3. Running pass 'Function Pass Manager' on module
'external/libopus/celt/celt_decoder.c'.
4. Running pass 'Combine redundant instructions' on function
'@celt_decode_with_ec'
clang: error: unable to execute command: Aborted (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 5.0.0 (trunk 298676)
Target: arm--linux-android
--
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/20170324/532387fa/attachment.html>
More information about the llvm-bugs
mailing list