From 1ea0e674b0a0ec75772a74783ad0d21454cd5d86 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Mon, 22 Jun 2015 15:54:58 +0200 Subject: [PATCH] re PR target/65871 (bzhi builtin/intrinsic wrongly assumes bzhi instruction doesn't set the ZF flag) PR target/65871 * config/i386/i386.c (ix86_rtx_costs) : Ignore the cost of embedded comparison. From-SVN: r224729 --- gcc/ChangeLog | 6 ++++++ gcc/config/i386/i386.c | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9bfaa22f49b..6ca98cf10f7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-06-22 Uros Bizjak + + PR target/65871 + * config/i386/i386.c (ix86_rtx_costs) : Ignore the + cost of embedded comparison. + 2015-06-22 Bill Schmidt PR target/65914 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 24fccfca53d..2df91c48d4d 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -42531,6 +42531,12 @@ ix86_rtx_costs (rtx x, int code_i, int outer_code_i, int opno, int *total, + rtx_cost (const1_rtx, outer_code, opno, speed)); return true; } + + /* The embedded comparison operand is completely free. */ + if (!general_operand (XEXP (x, 0), GET_MODE (XEXP (x, 0))) + && XEXP (x, 1) == const0_rtx) + *total = 0; + return false; case FLOAT_EXTEND: -- 2.30.2