There was a small mistake in the X86 error checking: i64 inreg arguments should count as consuming two registers. Fix: - InRegCount++; + InRegCount += (getTargetData()->getTypeSizeInBits(*I) + 31) / 32;