Extremely bad alien codegen with (optimize (space 0))

Bug #1988683 reported by Douglas Katzman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
New
Undecided
Unassigned

Bug Description

SB-MD5::FILL-BLOCK-UB8 produces absolutely horrible code: 4 SAP allocations and a full call to an unoptimized ALIEN-FUNCALL

But ironically when (SPACE 0) is _removed_ from the declarations, the result is exactly as expected: type checks, some SAP arithmetic entailing no allocation, and a call to memmove().
And the correct function is smaller by > 2x.

Same thing applies to the whole file. FINALIZE-MD5-STATE is about 1188 bytes with (SPACE 0) but drops to about 850 bytes with the default of (SPACE 1).

Saying that space is unimportant should at worst do nothing, not be actively harmful. Obviously something is badly specified in a POLICY guard on some transform to be so unintuitive.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.