On Mon, 24 Aug 2020, Jeff Law via Gcc wrote: > On Thu, 2020-08-20 at 21:36 +0530, Senthil Kumar Selvaraj via Gcc wrote: > > The post-reload splitter introduces the clobber. The wiki > > suggests that approach if most insns clobber REG_CC, perhaps because of > > the missed optimizations you describe below? > If most patterns set/clobber the flags, then yes, it's slightly better to only > expose them after reload. Various passes that directly grub through RTL > rather > than using helpers like single_set will optimize things better.
The "slightly" being omissions like the one fixed in combine.c last month. ;-) There's one in reload too ("Discard obvious no-ops, even without -O"), but it seems to be acting the other way(!) If, for a machine where most insns clobber REG_CC, you instead emit with the clobber initially, you can have a tidier port: one define_subst:ed pattern instead of... How many is it with the only-expose-after-reload method (counting define_insn, define_split, possibly a define_expand too that wasn't there for cc0)? Two or three, per (original) insn with cc0? brgds, H-P