On Sat, 29 Jan 2022, Andrew Pinski wrote: > On Sat, Jan 29, 2022 at 6:30 PM Zhao Wei Liew via Gcc-patches > <gcc-patches@gcc.gnu.org> wrote: > > > > Sincere apologies for the issues. I wasn't aware of the need for a cast but > > after reading the PRs, I understand that now. On the other hand, the > > incorrect test case was simply a major oversight on my part. > > > > I'll be sure to be more careful next time. > > Well I think gimple-match should have caught the cast issue really. I > filed https://gcc.gnu.org/PR104286 for that. I hope to submit a patch > for stage 1 to catch that so it will be harder to happen in the first > place.
I suppose that we could change verify_gimple_* to receive gimple_match_op (or simply exploded args) and we could then, with -fchecking, verify each such built match-op (some passes also build "custom" ones they feed into match-and-simplify). Richard.