tree-optimization/112623 - forwprop VEC_PACK_TRUNC generation
commitaef1aaff41190d2f82cf49d8907682b6dff71c3c
authorRichard Biener <rguenther@suse.de>
Tue, 21 Nov 2023 13:46:31 +0000 (21 14:46 +0100)
committerRichard Biener <rguenther@suse.de>
Tue, 21 Nov 2023 14:44:11 +0000 (21 15:44 +0100)
treea76dc15930cfd323d84a640e805d5b6e2df0e3b1
parentae156936cf4f15d9cc2b7d4e39f2e6b8fe22a9c3
tree-optimization/112623 - forwprop VEC_PACK_TRUNC generation

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.

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.
gcc/testsuite/gcc.target/i386/pr112623.c [new file with mode: 0644]
gcc/tree-ssa-forwprop.cc