This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Without the patch cse is only able to replace one of the PLUS operands resulting in code like:My replacement will get this, because it looks into all the uses. Good to know.
r2 = u r3 = v
r4 = r3 r4 += 4 r2 += &a r1 = [r3 + r2] r1 += [r4 + r2] r1 += [r4 + r2 + 4]
And with the patch applied we get:
r2 = u r3 = v
r2 += &a
r1 = [r3 + r2]
r1 += [r3 + r2 + 4]
r1 += [r3 + r2 + 8]
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |