https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69633
Bug ID: 69633 Summary: [6 Regression] Redundant move is generated after r228097 Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: ysrumyan at gmail dot com Target Milestone: --- Sorry, that we noticed this regression just now but not in September. After Makarov's fix for 61578 ( and s390 regression) we noticed that for attached simple test-case extracted from real benchmark one more redundant move instruction is generated (till 20160202 compiler build): before fix (postreload dump) 86: NOTE_INSN_BASIC_BLOCK 4 40: dx:QI=[si:SI] 41: ax:QI=[si:SI+0x1] 42: {si:SI=si:SI+0x3;clobber flags:CC;} 43: dx:SI=zero_extend(dx:QI) 44: ax:SI=zero_extend(ax:QI) 45: cx:SI=zero_extend([si:SI-0x1]) 46: {di:SI=dx:SI*0x4c8b;clobber flags:CC;} 47: {bx:SI=ax:SI*0x9646;clobber flags:CC;} 48: {bx:SI=bx:SI+di:SI;clobber flags:CC;} 49: {di:SI=cx:SI*0x1d2f;clobber flags:CC;} 50: NOTE_INSN_DELETED 51: bx:SI=bx:SI+di:SI+0x8000 52: {bx:SI=bx:SI>>0x10;clobber flags:CC;} 53: [bp:SI]=bx:QI 96: bx:SI=dx:SI 55: {bx:SI=bx:SI<<0xf;clobber flags:CC;} 57: {bx:SI=bx:SI-dx:SI;clobber flags:CC;} after fix 86: NOTE_INSN_BASIC_BLOCK 4 40: dx:QI=[si:SI] 41: ax:QI=[si:SI+0x1] 42: {si:SI=si:SI+0x3;clobber flags:CC;} 43: dx:SI=zero_extend(dx:QI) 44: ax:SI=zero_extend(ax:QI) 45: cx:SI=zero_extend([si:SI-0x1]) 46: {di:SI=dx:SI*0x4c8b;clobber flags:CC;} 47: {bx:SI=ax:SI*0x9646;clobber flags:CC;} 48: {bx:SI=bx:SI+di:SI;clobber flags:CC;} 49: {di:SI=cx:SI*0x1d2f;clobber flags:CC;} 50: NOTE_INSN_DELETED 51: bx:SI=bx:SI+di:SI+0x8000 52: {bx:SI=bx:SI>>0x10;clobber flags:CC;} 53: [bp:SI]=bx:QI 96: bx:SI=dx:SI 55: {bx:SI=bx:SI<<0xf;clobber flags:CC;} 98: di:SI=bx:SI !! redundnat move 57: {di:SI=di:SI-dx:SI;clobber flags:CC;} In result, we got >3% slowdown on Silvermont in pie & 32-bit mode.