> --quote-- > If we want to use this pass for x86, then for 4.8 we should also fix the > discrepancy between the compare-elim canonical > > [(operate) > (set-cc)] > > and the combine canonical > > [(set-cc) > (operate)] > > (Because of the simplicity of the substitution in compare-elim, I prefer > the former as the canonical canonical.) > --/quote--
I agree with the above. > There were some patches flowing around [2], [3] that enhanced > compare-elim pass for x86 needs, but the target never switched to new > pass, mostly because compare-elim pass did not catch all cases that > traditional RTX combine pass did. Does [2] really work with the mode mismatch? See the pending patch at https://gcc.gnu.org/ml/gcc-patches/2014-11/msg03458.html > Due to the above, I would like to propose that existing RTX compare > pass be updated to handle [(operate)(set-cc)] patterns (exclusively?). That's already what it does though, did you mean the opposite? Or did you mean to write "combine" instead of "compare"? > There is also hidden benefit for "other", compare-elim only targets. > Having this pass enabled on a wildly popular target would help > catching eventual bugs in the pass. FWIW we're about to submit a port that makes a heavy use of it. -- Eric Botcazou