pp_hir: add support for all_equal and any_nequal
pp_hir: fix bugs