LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 3235 - instcombine crash on i128
Summary: instcombine crash on i128
Status: RESOLVED FIXED
Alias: None
Product: new-bugs
Classification: Unclassified
Component: new bugs (show other bugs)
Version: unspecified
Hardware: Other Linux
: P normal
Assignee: Unassigned LLVM Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-19 01:57 PST by Duncan Sands
Modified: 2009-01-05 17:46 PST (History)
5 users (show)

See Also:
Fixed By Commit(s):


Attachments
testcase.ll (746 bytes, text/plain)
2008-12-29 02:34 PST, Duncan Sands
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan Sands 2008-12-19 01:57:24 PST
$ opt -instcombine -disable-output x.bc
opt: llvm/include/llvm/ADT/APInt.h:1051: int64_t llvm::APInt::getSExtValue() const: Assertion `getMinSignedBits() <= 64 && "Too many bits for int64_t"' failed.

This fires when building Fortran on x86-64 linux, and was introduced by:

r59403 | lattner | 2008-11-16 06:38:51 +0100 (Sun, 16 Nov 2008) | 2 lines

simplify a bunch more instcombines to use m_Specific etc.

Testcase:

define i128 @m(i1 %f) nounwind {
entry:
        %tmp = select i1 %f, i128 18446744073709551615, i128 9223372036854775807                ; <i128> [#uses=1]
        ret i128 %tmp
}
Comment 1 Eli Friedman 2008-12-19 02:35:10 PST
If I recall correctly, the pattern-matching code uses getSExtValue unconditionally.
Comment 2 Chris Lattner 2008-12-19 12:14:14 PST
taking a look
Comment 3 Chris Lattner 2008-12-19 12:15:52 PST
This doesn't fail for me with mainline, can you please reverify and if it still fails, attach a stack trace with line numbers?
Comment 4 Duncan Sands 2008-12-19 12:54:29 PST
This seems to have gone away in tot.
Comment 5 Duncan Sands 2008-12-29 02:34:28 PST
Created attachment 2342 [details]
testcase.ll

Less reduced testcase.
Comment 6 Duncan Sands 2008-12-29 02:38:57 PST
This is failing again.  Maybe it's a Heisenbug?  I've
added a new less reduced testcase.