[llvm-bugs] [Bug 41194] New: opt -irce crashing with "Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed"
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Mar 22 01:52:37 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=41194
Bug ID: 41194
Summary: opt -irce crashing with "Assertion `isa<X>(Val) &&
"cast<Ty>() argument of incompatible type!"' failed"
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: unassignedbugs at nondot.org
Reporter: mikael.holmen at ericsson.com
CC: llvm-bugs at lists.llvm.org
Created attachment 21652
--> https://bugs.llvm.org/attachment.cgi?id=21652&action=edit
reproducer
Reproduce with:
opt -irce bbi-26117.ll -S -o -
which yields:
opt: ../include/llvm/Support/Casting.h:254: typename cast_retty<X, Y
*>::ret_type llvm::cast(Y *) [X = llvm::IntegerType, Y = llvm::Type]: Assertion
`isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
Stack dump:
0. Program arguments: build-all/bin/opt -irce bbi-26117.ll -S -o -
1. Running pass 'Function Pass Manager' on module 'bbi-26117.ll'.
2. Running pass 'Loop Pass Manager' on function '@test_read_imm_2'
3. Running pass 'Inductive range check elimination' on basic block
'%cont48'
#0 0x000000000229a344 PrintStackTraceSignalHandler(void*)
(build-all/bin/opt+0x229a344)
#1 0x0000000002298350 llvm::sys::RunSignalHandlers()
(build-all/bin/opt+0x2298350)
#2 0x000000000229a6a8 SignalHandler(int) (build-all/bin/opt+0x229a6a8)
#3 0x00007f6fcc262330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#4 0x00007f6fcae51c37 gsignal
/build/eglibc-ripdx6/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#5 0x00007f6fcae55028 abort
/build/eglibc-ripdx6/eglibc-2.19/stdlib/abort.c:91:0
#6 0x00007f6fcae4abf6 __assert_fail_base
/build/eglibc-ripdx6/eglibc-2.19/assert/assert.c:92:0
#7 0x00007f6fcae4aca2 (/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
#8 0x0000000002063ca5 (anonymous
namespace)::InductiveRangeCheckElimination::run(llvm::Loop*,
llvm::function_ref<void (llvm::Loop*, bool)>) (build-all/bin/opt+0x2063ca5)
#9 0x0000000002066341 (anonymous
namespace)::IRCELegacyPass::runOnLoop(llvm::Loop*, llvm::LPPassManager&)
(build-all/bin/opt+0x2066341)
#10 0x00000000016fa4dc llvm::LPPassManager::runOnFunction(llvm::Function&)
(build-all/bin/opt+0x16fa4dc)
#11 0x0000000001ca0d4d llvm::FPPassManager::runOnFunction(llvm::Function&)
(build-all/bin/opt+0x1ca0d4d)
#12 0x0000000001ca1008 llvm::FPPassManager::runOnModule(llvm::Module&)
(build-all/bin/opt+0x1ca1008)
#13 0x0000000001ca146a llvm::legacy::PassManagerImpl::run(llvm::Module&)
(build-all/bin/opt+0x1ca146a)
#14 0x00000000007a073b main (build-all/bin/opt+0x7a073b)
#15 0x00007f6fcae3cf45 __libc_start_main
/build/eglibc-ripdx6/eglibc-2.19/csu/libc-start.c:321:0
#16 0x000000000078618d _start (build-all/bin/opt+0x78618d)
Abort
Starts crashing with r351926:
[IRCE] Support narrow latch condition for wide range checks
This patch relaxes restrictions on types of latch condition and range
check.
In current implementation, they should match. This patch allows to handle
wide range checks against narrow condition. The motivating example is the
following:
int N = ...
for (long i = 0; (int) i < N; i++) {
if (i >= length) deopt;
}
In this patch, the option that enables this support is turned off by
default. We'll wait until it is switched to true.
Differential Revision: https://reviews.llvm.org/D56837
Reviewed By: reames
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351926
91177308-0d34-0410-b5e6-96231b3b80d8
--
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/20190322/0b279573/attachment.html>
More information about the llvm-bugs
mailing list