On Fri, Nov 17, 2017 at 08:06:09AM -0600, Segher Boessenkool wrote: > Hi! > > On Fri, Nov 17, 2017 at 12:04:45AM -0500, Michael Meissner wrote: > > This patch is an enhancement of a previous page that never got approved. > > https://gcc.gnu.org/ml/gcc-patches/2017-10/threads.html#02124 > > > > In the original patch, I added support to the machine independent > > infrastructure to support the rounding built-in functions for _Float<N> and > > _Float<N>X types (i.e. roundf128, ceilf128, etc.). I also added PowerPC ISA > > 3.0 support to generate these built-in functions. > > > > In addition to the previous changes, this patch now adds more optimizations > > for > > _Float<N> and _Float<N>X types in match.pd. > > > +(define_insn "btrunc<mode>2" > > + [(set (match_operand:IEEE128 0 "altivec_register_operand" "=v") > > + (unspec:IEEE128 > > + [(match_operand:IEEE128 1 "altivec_register_operand" "v")] > > + UNSPEC_FRIZ))] > > + "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (<MODE>mode)" > > + "xsrqpi 1,%0,%1,0" > > + [(set_attr "type" "vecfloat") > > + (set_attr "size" "128")]) > > Is this one correct? Truncate is RMC=1, not RMC=0, I think?
Good catch. I just tried it, and you were right. > The rest of the rs6000 part looks fine. Thanks! I will re-submit a patch once the bootstraps finish. Just to be sure, I'm adding a new test that tests it at runtime. -- Michael Meissner, IBM IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA email: meiss...@linux.vnet.ibm.com, phone: +1 (978) 899-4797