The following code generates an object file which is over 30 MB in size:
void bar(char *a); void foo (void) { char b[5000000000000000]; bar(b); }
The reason is that the code to push the space on the stack consists of over 2 million subtract
instructions of the form:
subq $2147483647, %rsp # imm = 0x7FFFFFFF
Instead of doing multiple immediate mode subtracts, the compiler should place the final amount to
be subtracted into a register and do a single subtraction.
This clobbers rax/eax w/o checking whether it's a livein or not. This may be a problem for functions with inreg attributes. I believe the code should always use findDeadCallerSavedReg().