On Wed, 22 May 2019 at 23:28, Richard Henderson <richard.hender...@linaro.org> wrote: > > We already had backend support for this feature. Expand the new > cmpsel opcode using vpblendb. The combination allows us to avoid > an extra NOT for some comparison codes. > > Signed-off-by: Richard Henderson <richard.hender...@linaro.org> > --- > tcg/i386/tcg-target.h | 2 +- > tcg/i386/tcg-target.inc.c | 39 +++++++++++++++++++++++++++++++++++---- > 2 files changed, 36 insertions(+), 5 deletions(-) > > diff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-target.h > index 16a83a7f7b..928e8b87bb 100644 > --- a/tcg/i386/tcg-target.h > +++ b/tcg/i386/tcg-target.h > @@ -191,7 +191,7 @@ extern bool have_avx2; > #define TCG_TARGET_HAS_sat_vec 1 > #define TCG_TARGET_HAS_minmax_vec 1 > #define TCG_TARGET_HAS_bitsel_vec 0 > -#define TCG_TARGET_HAS_cmpsel_vec 0 > +#define TCG_TARGET_HAS_cmpsel_vec -1
This is the only place where we define a TCG_TARGET_HAS_* macro to something other than 0 or 1, which means that Coverity complains (CID 1401702) when we use it in a logical boolean expression return have_vec && TCG_TARGET_HAS_cmpsel_vec; later on. Should it really be -1, or is this a typo for 1 ? thanks -- PMM