As mentioned in http://gcc.gnu.org/ml/gcc-patches/2011-03/msg00335.html
setmem patterns on several targets (but also e.g. dse.c recognizes it) use patterns like
(set (mem:BLK ...) (const_int N))
(set (mem:BLK ...) (reg:M X))
for memset (, N, ) and memset (, X, ). This is a mode mismatch, we should come up with something better, e.g. some RTL expression that gives BLKmode from
VOIDmode/QImode similar to VEC_DUPLICATE that would be used in that case.
For the record, there was an older thread about this too: