On Wed, Feb 01, 2017 at 11:56:34PM -0600, Segher Boessenkool wrote: > On Mon, Jan 30, 2017 at 10:27:15PM +0100, Jakub Jelinek wrote: > > Accoring to make mddump generated tmp-mddump.md, on powerpc the only pattern > > with unsigned_fix:DI where the inner operand is SF or DFmode is the > > *fixuns_trunc<mode>di2_fctiduz. There is an expander for that instruction, > > which uses different operand predicates and different condition, so the > > following testcases show 2 different cases, in one the condition for the > > expander is true and false for the actual insn, the other where > > register_operand is true (SFmode subreg), while gpc_reg_operand is false. > > (There are other expanders and patterns that handle vector modes, or > > SImode, or DImode with KF/TFmodes.) > > > > As there is just one insn that satisfies it, it makes no sense to have > > different conditions or different predicates (there would need to be other > > define_insn* patterns that would handle the rest), but I don't really even > > see the point in duplication of the condition and predicates, the > > define_insn itself can serve as expander. > > > > Bootstrapped/regtested on powerpc64{,le}-linux, ok for trunk? > > After much confusion... Yes, okay for trunk. Thanks, and sorry for > all the fuss about such a simple patch.
Thanks, though at this point I think the http://gcc.gnu.org/ml/gcc-patches/2017-01/msg02390.html patch is better. With the earliest patch (the one below) for -mvsx -mno-popcntd (or whatever -mcpu= implies that) there is no DF->DI conversion at all, while with the latest one (msg02390.html) we can still emit the xscvdpuxds instruction (as the only alternative, kind like as if the *fixuns_trunc<mode>di2_fctiduz instruction disabled the fctiduz alternative if power7 isn't availkable, at least for DF->DI). > > 2017-01-30 Jakub Jelinek <ja...@redhat.com> > > > > PR target/79197 > > * config/rs6000/rs6000.md (*fixuns_trunc<mode>di2_fctiduz): Rename to > > ... > > (fixuns_trunc<mode>di2): ... this, remove previous expander. Put all > > conditions on a single line. > > > > * gcc.target/powerpc/pr79197.c: New test. > > * gcc.c-torture/compile/pr79197.c: New test. Jakub