https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87104
pipcet at gmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44617|0 |1 is obsolete| | --- Comment #14 from pipcet at gmail dot com --- Created attachment 44719 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44719&action=edit WIP patch Okay, I've run into a few issues: 1. temacs run time changes unpredictably based on the configuration data, because of find_string_data_in_pure. 2. My CPU fuses "cmp" and a conditional branch and "test" and a conditional branch, but not "and" and a conditional branch. So we were optimizing a three-insn two-uop sequence into a two-insn two-uop sequence, and I was not seeing any performance improvement. 3. The code size changes sometimes cause branches to be mispredicted much more often for no apparent reason. I've worked around (1) and (2), by disabling find_string_data_in_pure() and making the peephole rule that turned "test" into "and" conditional on CPU type. Now I'm seeing a consistent performance improvement (as well as fewer instructions, fewer uops, and more fused branches) for Perl and Emacs.