On 11/13/19 8:35 PM, Jeff Law wrote: > On 11/13/19 6:04 AM, Bernd Schmidt wrote: >> The cc0 machinery allows for eliminating unnecessary comparisons by >> examining the effect instructions have on the flags registers. I have >> replicated that mechanism with a relatively modest amount of code based >> on a final_postscan_insn hook, but it is now opt-in: an instruction >> pattern can set the "flags_valid" attribute to a number of possible >> values to indicate what effect it has. That should be more reliable (try >> git log m68k.md to see recent sprinkling of CC_STATUS_INIT to squash >> bugs with the previous mechanism). > Yea, sounds like a reimplementation of the tst elimination bits, but > buried in the backend. Given the choice of dropping the port or burying > this kind of stuff in there, I'd lean towards accepting the latter.
Indeed. Even if we wanted an eventual transition to the tst elimination bits, this is a better starting place than from cc0. r~