On Tue, Jul 27, 2021 at 5:21 AM Kewen.Lin <li...@linux.ibm.com> wrote: > > Hi, > > As PR101596 showed, vect_recog_mulhs_pattern uses target_precision to > check the scale_term is expected or not, it could be wrong when the > precision of the actual used new_type larger than target_precision as > shown by the example. > > This patch is to use precision of new_type instead of target_precision > for the scale_term matching check. > > Bootstrapped & regtested on powerpc64le-linux-gnu P10, > powerpc64-linux-gnu P8, x86_64-redhat-linux and aarch64-linux-gnu. > > Is it ok for trunk?
OK. Richard. > BR, > Kewen > ----- > gcc/ChangeLog: > > PR tree-optimization/100696 > * tree-vect-patterns.c (vect_recog_mulhs_pattern): Fix wrong check > by using new_type's precision instead. > > gcc/testsuite/ChangeLog: > > PR tree-optimization/100696 > * gcc.target/powerpc/pr101596-1.c: New test. > * gcc.target/powerpc/pr101596-2.c: Likewise. > * gcc.target/powerpc/pr101596-3.c: Likewise.