On Mon, Jun 29, 2015 at 10:05 PM, Bill Schmidt <wschm...@linux.vnet.ibm.com> wrote: > Hi, > > This patch adds built-in functions for vec_cmpge and vec_cmple required > by the ELFv2 ABI but not yet present in gcc. These make use of the > existing patterns for gt:VEC_I and gtu:VEC_I, applying the "not" > operator and reversing the order of operands as needed. The result is > generation of a vmpgt[su][bhwd] instruction followed by an xxlnor. > > Since it is likely that a vec_cmp[gl]e will be followed by a vec_sel, it > will be important to optimize the xxlnor/xxsel* to remove the xxlnor by > reversing the sense of the select. A separate patch will follow to add > this pattern to simplify-rtx.c. > > Bootstrapped and tested on powerpc64le-unknown-linux-gnu with no > regressions. Ok for trunk? > > Thanks, > Bill > > > [gcc] > > 2015-06-29 Bill Schmidt <wschm...@linux.vnet.ibm.com> > > * config/rs6000/rs6000-builtin.def (CMPGE_16QI): New built-in > definition. > (CMPGE_8HI): Likewise. > (CMPGE_4SI): Likewise. > (CMPGE_2DI): Likewise. > (CMPGE_U16QI): Likewise. > (CMPGE_U8HI): Likewise. > (CMPGE_U4SI): Likewise. > (CMPGE_U2DI): Likewise. > (CMPLE_16QI): Likewise. > (CMPLE_8HI): Likewise. > (CMPLE_4SI): Likewise. > (CMPLE_2DI): Likewise. > (CMPLE_U16QI): Likewise. > (CMPLE_U8HI): Likewise. > (CMPLE_U4SI): Likewise. > (CMPLE_U2DI): Likewise. > * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add > overloads for ALTIVEC_BUILTIN_VEC_CMPGE and > ALTIVEC_BUILTIN_VEC_CMPLE. > * config/rs6000/vector.md (vector_ge<mode>): Restrict to > floating-point vector modes. > (vector_nlt<mode>): New define_expand. > (vector_nltu<mode>): Likewise. > (vector_ngt<mode>): Likewise. > (vector_ngtu<mode>): Likewise. > > [gcc/testsuite] > > 2015-06-29 Bill Schmidt <wschm...@linux.vnet.ibm.com> > > * gcc.target/powerpc/vec-cmp.c: New test.
Okay. Thanks, David