https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92394

            Bug ID: 92394
           Summary: operand_equal_p should compare as base+offset when
                    comparing addresses
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hubicka at gcc dot gnu.org
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

Compiling firefox one gets many of:
  false returned: '' in operand_equal_p at ../../gcc/ipa-icf-gimple.c:259       
  false returned: 'operand_equal_p failed' in compare_operand at
../../gcc/ipa-icf-gimple.c:303
  false returned: 'memory operands are different' in compare_gimple_assign at
../../gcc/ipa-icf-gimple.c:621
  different statement for code: GIMPLE_ASSIGN (compare_bb:468):                 
_6 = &self_5->D.1557805.D.1541362.D.1218628.D.20474;                            
_6 = &self_5->D.1593155;                                                        
  false returned: '' in equals_private at ../../gcc/ipa-icf.c:885               
Equals called for: _finalize/10691342:_finalize/10809461 with result: false     

here operand_equal_p seems overly conservative (assuming that base+offset
match). When comparing stuff in ADDR_EXPR it does not need to care about actual
access path.

Reply via email to