[llvm-bugs] [Bug 25313] New: [Polly] Large values in BoundaryContext causes '"ConstantInt type doesn't match the type implied by its value!'

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Oct 25 05:50:59 PDT 2015


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

            Bug ID: 25313
           Summary: [Polly] Large values in BoundaryContext causes
                    '"ConstantInt type doesn't match the type implied by
                    its value!'
           Product: Projects
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Polly
          Assignee: polly-dev at googlegroups.com
          Reporter: tobias at grosser.es
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 15158
  --> https://llvm.org/bugs/attachment.cgi?id=15158&action=edit
Test case

With r251231 polly-opt -polly-codegen we get the following assertion:

opt: /home/grosser/Projects/polly/git/lib/IR/Constants.cpp:608: static
llvm::Constant *llvm::ConstantInt::get(llvm::Type *, const llvm::APInt &):
Assertion `C->getType() == Ty->getScalarType() && "ConstantInt type doesn't
match the type implied by its value!"' failed.
#0 0x7f1156e72d8a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/grosser/Projects/polly/cmake_opt/bin/../lib/libLLVMSupport.so.3.8+0xc1d8a)
#1 0x7f1156e723f6 llvm::sys::RunSignalHandlers()
(/home/grosser/Projects/polly/cmake_opt/bin/../lib/libLLVMSupport.so.3.8+0xc13f6)
#2 0x7f1156e7463a SignalHandler(int)
(/home/grosser/Projects/polly/cmake_opt/bin/../lib/libLLVMSupport.so.3.8+0xc363a)
#3 0x7f11558012f0 (/lib/x86_64-linux-gnu/libc.so.6+0x352f0)
#4 0x7f1155801267 gsignal
/build/buildd/glibc-2.21/signal/../sysdeps/unix/sysv/linux/raise.c:55:0
#5 0x7f1155802eca abort /build/buildd/glibc-2.21/stdlib/abort.c:91:0
#6 0x7f11557fa03d __assert_fail_base
/build/buildd/glibc-2.21/assert/assert.c:92:0
#7 0x7f11557fa0f2 (/lib/x86_64-linux-gnu/libc.so.6+0x2e0f2)
#8 0x7f1158453cd3
(/home/grosser/Projects/polly/cmake_opt/bin/../lib/libLLVMCore.so.3.8+0xb2cd3)
#9 0x7f11530b6454 polly::IslExprBuilder::createInt(isl_ast_expr*)
(/home/grosser/Projects/polly/cmake_opt/lib/../lib/libPolly.so+0x8b454)

The reason for this assertion is that the BoundaryContext contains numbers
larger than 64bit, but we currently generate 64 bit expressions by default. The
right solution is clearly to derive minimal (but still correct types) during
code generation. However, for now the best solution is probably to keep the
BoundaryContext separate and then just use 128bit arithmetic to generate the
relevant run-time check. 

9 compile time errors (and as a a result 9 run-time errors) of our current
-polly-process-nonprofitable failures are due to this issue.

-- 
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/20151025/57d13991/attachment.html>


More information about the llvm-bugs mailing list