https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77738
Bug ID: 77738
Summary: Invalid initialisation of ar.lc register
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
Target Milestone: ---
Target: ia64-*-*
The doloop pass miscalculates the initial value of the ar.lc register if the
loop variable is narrower than 64 bit and the loop count is bigger then
INT_MAX.
int
main (void)
{
unsigned int t = 0x80000001;
while (--t) {}
}
movl r14 = -2147483648
;;
mov ar.lc = r14
.L2:
;;
br.cloop.sptk.few .L2