[llvm-bugs] [Bug 37924] New: 'Assertion `BitWidth == RHS.BitWidth && "Bit widths must be the same"' failed.' with --aa-eval

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jun 25 01:27:06 PDT 2018


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

            Bug ID: 37924
           Summary: 'Assertion `BitWidth == RHS.BitWidth && "Bit widths
                    must be the same"' failed.' with --aa-eval
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: mikael.holmen at ericsson.com
                CC: llvm-bugs at lists.llvm.org

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

Running
 opt -S -o - bbi-15492.ll -aa-eval

gives

opt: ../lib/Support/APInt.cpp:193: llvm::APInt &llvm::APInt::operator+=(const
llvm::APInt &): Assertion `BitWidth == RHS.BitWidth && "Bit widths must be the
same"' failed.
Stack dump:
0.      Program arguments: build-all/bin/opt -S -o - bbi-15492.ll -aa-eval 
1.      Running pass 'Function Pass Manager' on module 'bbi-15492.ll'.
2.      Running pass 'Exhaustive Alias Analysis Precision Evaluator' on
function '@f1'
#0 0x0000000001fef724 PrintStackTraceSignalHandler(void*)
(build-all/bin/opt+0x1fef724)
#1 0x0000000001fed990 llvm::sys::RunSignalHandlers()
(build-all/bin/opt+0x1fed990)
#2 0x0000000001fefa88 SignalHandler(int) (build-all/bin/opt+0x1fefa88)
#3 0x00007f9e8ac12330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#4 0x00007f9e89801c37 gsignal
/build/eglibc-ripdx6/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#5 0x00007f9e89805028 abort
/build/eglibc-ripdx6/eglibc-2.19/stdlib/abort.c:91:0
#6 0x00007f9e897fabf6 __assert_fail_base
/build/eglibc-ripdx6/eglibc-2.19/assert/assert.c:92:0
#7 0x00007f9e897faca2 (/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
#8 0x0000000001f7d733 (build-all/bin/opt+0x1f7d733)
#9 0x0000000001447f3c llvm::BasicAAResult::GetLinearExpression(llvm::Value
const*, llvm::APInt&, llvm::APInt&, unsigned int&, unsigned int&,
llvm::DataLayout const&, unsigned int, llvm::AssumptionCache*,
llvm::DominatorTree*, bool&, bool&) (build-all/bin/opt+0x1447f3c)
#10 0x0000000001447f29 llvm::BasicAAResult::GetLinearExpression(llvm::Value
const*, llvm::APInt&, llvm::APInt&, unsigned int&, unsigned int&,
llvm::DataLayout const&, unsigned int, llvm::AssumptionCache*,
llvm::DominatorTree*, bool&, bool&) (build-all/bin/opt+0x1447f29)
#11 0x0000000001447f29 llvm::BasicAAResult::GetLinearExpression(llvm::Value
const*, llvm::APInt&, llvm::APInt&, unsigned int&, unsigned int&,
llvm::DataLayout const&, unsigned int, llvm::AssumptionCache*,
llvm::DominatorTree*, bool&, bool&) (build-all/bin/opt+0x1447f29)
#12 0x0000000001447f29 llvm::BasicAAResult::GetLinearExpression(llvm::Value
const*, llvm::APInt&, llvm::APInt&, unsigned int&, unsigned int&,
llvm::DataLayout const&, unsigned int, llvm::AssumptionCache*,
llvm::DominatorTree*, bool&, bool&) (build-all/bin/opt+0x1447f29)
#13 0x0000000001447f29 llvm::BasicAAResult::GetLinearExpression(llvm::Value
const*, llvm::APInt&, llvm::APInt&, unsigned int&, unsigned int&,
llvm::DataLayout const&, unsigned int, llvm::AssumptionCache*,
llvm::DominatorTree*, bool&, bool&) (build-all/bin/opt+0x1447f29)
#14 0x0000000001447f29 llvm::BasicAAResult::GetLinearExpression(llvm::Value
const*, llvm::APInt&, llvm::APInt&, unsigned int&, unsigned int&,
llvm::DataLayout const&, unsigned int, llvm::AssumptionCache*,
llvm::DominatorTree*, bool&, bool&) (build-all/bin/opt+0x1447f29)
#15 0x000000000144d29b
llvm::BasicAAResult::constantOffsetHeuristic(llvm::SmallVectorImpl<llvm::BasicAAResult::VariableGEPIndex>
const&, unsigned long, unsigned long, long, llvm::AssumptionCache*,
llvm::DominatorTree*) (build-all/bin/opt+0x144d29b)
#16 0x000000000144cb38 llvm::BasicAAResult::aliasGEP(llvm::GEPOperator const*,
unsigned long, llvm::AAMDNodes const&, llvm::Value const*, unsigned long,
llvm::AAMDNodes const&, llvm::Value const*, llvm::Value const*)
(build-all/bin/opt+0x144cb38)
#17 0x000000000144a863 llvm::BasicAAResult::aliasCheck(llvm::Value const*,
unsigned long, llvm::AAMDNodes, llvm::Value const*, unsigned long,
llvm::AAMDNodes, llvm::Value const*, llvm::Value const*)
(build-all/bin/opt+0x144a863)
#18 0x000000000144a060 llvm::BasicAAResult::alias(llvm::MemoryLocation const&,
llvm::MemoryLocation const&) (build-all/bin/opt+0x144a060)
#19 0x0000000001432f0f llvm::AAResults::alias(llvm::MemoryLocation const&,
llvm::MemoryLocation const&) (build-all/bin/opt+0x1432f0f)
#20 0x0000000001439175 llvm::AAEvaluator::runInternal(llvm::Function&,
llvm::AAResults&) (build-all/bin/opt+0x1439175)
#21 0x000000000143c885 llvm::AAEvalLegacyPass::runOnFunction(llvm::Function&)
(build-all/bin/opt+0x143c885)
#22 0x0000000001a7a40a llvm::FPPassManager::runOnFunction(llvm::Function&)
(build-all/bin/opt+0x1a7a40a)
#23 0x0000000001a7a668 llvm::FPPassManager::runOnModule(llvm::Module&)
(build-all/bin/opt+0x1a7a668)
#24 0x0000000001a7ab9d llvm::legacy::PassManagerImpl::run(llvm::Module&)
(build-all/bin/opt+0x1a7ab9d)
#25 0x0000000000745aac main (build-all/bin/opt+0x745aac)
#26 0x00007f9e897ecf45 __libc_start_main
/build/eglibc-ripdx6/eglibc-2.19/csu/libc-start.c:321:0
#27 0x000000000072ee0d _start (build-all/bin/opt+0x72ee0d)
Abort

This is old. Found when running random passes on random input.

-- 
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/20180625/46b78450/attachment.html>


More information about the llvm-bugs mailing list