On Tue, Nov 21, 2023 at 02:35:02PM +0000, Richard Biener wrote: > For vec_pack_trunc patterns there can be an ambiguity for the > source mode for BFmode vs HFmode. The vectorizer checks > the insns operand mode for this, the following makes forwprop > do the same. That of course doesn't help if the target supports > both conversions. > > Bootstrapped and tested on x86_64-unknown-linux-gnu, OK? > > Thanks, > Richard. > > PR tree-optimization/112623 > * tree-ssa-forwprop.cc (simplify_vector_constructor): > Check the source mode of the insn for vector pack/unpacks. > > * gcc.target/i386/pr112623.c: New testcase.
LGTM, thanks. Jakub