On Fri, Jan 20, 2023 at 8:39 PM Takayuki 'January June' Suwa <jjsuwa_sys3...@yahoo.co.jp> wrote: > On 2023/01/21 0:14, Max Filippov wrote: > > After having this many attempts and getting to the issues that are > > really hard to detect I wonder if the target backend is the right place > > for this optimization? > > > I guess they are not hard to detect
I mean, on the testing side. check-gcc testsuite passed without new regressions with this change, linux kernel smoke test passed, I was almost convinced that it's ok to commit. > but just issues I didn't anticipate (and I just need a little more work). Looking at other peephole2 patterns I see that their code transformations are much more compact and they don't need to track additional properties of unrelated instructions. > And where else should it be done? What about implementing a > target-specific pass just for one-point optimization? I don't even understand what's target-specific in this optimization? It looks very generic to me. -- Thanks. -- Max