Bernd Schmidt <bernds_...@t-online.de> writes: > Take a look at reload_cse_move2add.
I don't think that powerful enough; it requires the same destination registers: /* Try to transform (set (REGX) (CONST_INT A)) ... (set (REGX) (CONST_INT B)) to (set (REGX) (CONST_INT A)) ... (set (REGX) (plus (REGX) (CONST_INT B-A))) I think you really need the Joern's optmize_related_values patch. Also see PR33699. Adam