On Mon, 11 May 2020, Uros Bizjak wrote: > Attached patch implements V2SFmode FMA insn patterns. Patched compiler > vectorizes FMA, FMS and FNMA instructions, but for some reason fails > to vectorize FNMS. > > I have double checked that the insn pattern is correct, and now I'm > all out of ideas what could be wrong with the pattern, still ignored > by the vectorizer. -fno-vect-cost-model does not help so it's time to > ask the experts...
Do you have negate patterns for V2SFmode? The vectorizer sees decomposed ops and only the vectorized operations are later formed into FMAs. Richard. > gcc/ChangeLog: > > 2020-05-11 Uroš Bizjak <ubiz...@gmail.com> > > PR target/95046 > * config/i386/mmx.md (fmav2sf4): New insn pattern. > (fmsv2sf4): Ditto. > (fnmav2sf4): Ditto. > (fnmsv2sf4): Ditto. > > testsuite/ChangeLog: > > 2020-05-11 Uroš Bizjak <ubiz...@gmail.com> > > PR target/95046 > * gcc.target/i386/pr95046-2.c: New test. > > Otherwise, the patch is bootstrapped and regression tested on > x86_64-linux-gnu {,-m32}. > > Uros. > -- Richard Biener <rguent...@suse.de> SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany; GF: Felix Imendörffer; HRB 36809 (AG Nuernberg)