On Fri, 18 May 2012, Andi Kleen wrote: > Richard Guenther <rguent...@suse.de> writes: > > > In PR53346 we vectorize a simple memset loop very inefficiently. > > But of course we should have detected this and transformed the > > loop into a memset! Seems like we only do that if the original > > loop does sth else than memset as well. > > Is there a way to turn this off?
-fno-tree-loop-distribute-patterns, it's enabled by default only at -O3. > I know code written in the past who explicitely wrote memset as a loop > because it couldn't deal with the optimizations optimized memsets do > (like reordering or changing access granuality. > > One example is clearing something in memory mapped hardware registers. > > It would be good at least if this was not done for volatile. I see it does it for volatile - that's clearly a bug that I'll address shortly. Richard.