[LLVMbugs] [Bug 3074] New: ConstantInt::get takes an "isSigned" parameter?
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Sat Nov 15 21:05:30 PST 2008
http://llvm.org/bugs/show_bug.cgi?id=3074
Summary: ConstantInt::get takes an "isSigned" parameter?
Product: libraries
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Core LLVM classes
AssignedTo: unassignedbugs at nondot.org
ReportedBy: nicholas at mxc.ca
CC: llvmbugs at cs.uiuc.edu
ConstantInt::get takes an isSigned parameter. Which is pretty amazing because
ConstantInts don't carry a sign. What it does with it, is pass it through to
the APInt constructor. Which is pretty amazing, because APInts don't carry a
sign.
The APInt constructor has two cases, one in which the entire value fits in a
int64_t. In the other case, it calls initSlowCase, which takes isSigned and
uses that to clear the memory space to all 0 bits or all 1 bits depending on
whether it's signed or unsigned.
You want to know what else is amazing? If you hard-code the isSigned parameter
to initSlowCase to false, make check fails.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list