On Tue, Nov 13, 2018 at 11:29:20AM -0600, Peter Bergner wrote: > PR87870 shows a problem loading simple constant values into TImode variables. > This is a regression ever since VSX was added and we started using the > vsx_mov<mode>_64bit pattern. We still get the correct code on trunk if we > compile with -mno-vsx, since we fall back to using the older mov<mode>_ppc64 > move pattern, which has an alternative "r" <- "n". > > Our current vsx_mov<mode>_64bit pattern currently has two alternatives for > loading constants into GPRs, one using "*r" <- "jwM" and "??r" <- "W". > These look redundant to me, since "W" contains support for both all-zero > constants (ie, "j") and all-one constants (ie, wM) as well as a few more. > My patch below consolidates them both and uses a new mode iterator that > uses "W" for the vector modes and "n" for TImode like mov<mode>_ppc64 > used.
Why does the "r" have a "*"? Should it have been just a "?"? "W" is easy_vector_constant, which requires const_vector always; is that okay here? > I'll note I didn't change the vsx_mov<mode>_32bit pattern, since TImode > isn't supported with -m32. However, if you want, I could remove the > redundant "*r" <- "jwM" alternative there too? Yeah, please keep the patterns in synch. Segher