These two patches implement the base support of builtin_zero_pattern into match.pd. To implement the other part requires match-and-simplify inside phiopt to support moving 2 statements from the middle-bb. The match.pd part is already incldued. I will try to get to it next week.
Also __builtin_clrsb has not been moved yet either and I will get to that next week as well. Andrew Pinski (2): PHIOPT: Allow moving of some builtin calls MATCH: add some of what phiopt's builtin_zero_pattern did gcc/match.pd | 41 +++++++++++++++++++++++++++++++++++++++-- gcc/tree-ssa-phiopt.cc | 35 +++++++++++++++++++++++++++++++---- 2 files changed, 70 insertions(+), 6 deletions(-) -- 2.39.1