https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93507
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- The fix for PR94703 at least makes RTL optimze it to foo: .LFB0: .cfi_startproc movl %edi, %eax ret GIMPLE is still foo (unsigned int x) { long unsigned int dst; long unsigned int _5; <bb 2> [local count: 1073741824]: dst = 0; MEM <unsigned int> [(char * {ref-all})&dst] = x_1(D); _5 = dst; dst ={v} {CLOBBER}; return _5; I have a patch teaching VN partial def handling to turn it into a BIT_INSERT and a match.pd pattern to simplify some BIT_INSERTs to conversions. Queued for GCC 11.