http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48027
Summary: setmem pattern using undesirable RTL Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassig...@gcc.gnu.org ReportedBy: ja...@gcc.gnu.org CC: r...@gcc.gnu.org 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)) or (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.