
As far as I can tell, the condition is that the length of the region is less than 128 and that the memory is four-byte aligned. If anything, this condition seems too weak on 64-bit platforms (but correct on 32-bit
#16052: Core optimizations for memset on a small range -------------------------------------+------------------------------------- Reporter: andrewthad | Owner: (none) Type: task | Status: new Priority: normal | Milestone: 8.9 Component: Compiler | Version: 8.6.3 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): platforms). I don’t know how the NCG normally deals with the 32 bit vs 64 bit distinction in other places. We could use sub-word-sized stores in the case of non-aligned offsets. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16052#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler