aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2018-08-19 21:10:37 +0200
committerUros Bizjak <uros@gcc.gnu.org>2018-08-19 21:10:37 +0200
commitc6067437d314f803a6b7c1083f6d280caaf17ce3 (patch)
treeb060ee11935f895447eae90d6f726a0a6d626a57 /gcc
parent49ad7eb55658cea1dd501b035c57c8d4cd350b90 (diff)
downloadgcc-c6067437d314f803a6b7c1083f6d280caaf17ce3.zip
gcc-c6067437d314f803a6b7c1083f6d280caaf17ce3.tar.gz
gcc-c6067437d314f803a6b7c1083f6d280caaf17ce3.tar.bz2
re PR target/86994 (64-bit gcc.target/i386/20040112-1.c FAILs)
PR target/86994 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for register_operand when calling ix86_set_reg_reg_cost. [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]: Set *total to 0 for operands that satisfy x86_64_immediate_operand predicate and to 1 otherwise. From-SVN: r263652
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/config/i386/i386.c18
2 files changed, 13 insertions, 14 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ccc76e4..ec1fb24 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2018-08-19 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/86994
+ * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
+ register_operand when calling ix86_set_reg_reg_cost.
+ [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
+ Set *total to 0 for operands that satisfy x86_64_immediate_operand
+ predicate and to 1 otherwise.
+
2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 3548de2..0b2b1b7 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -40554,7 +40554,7 @@ ix86_rtx_costs (rtx x, machine_mode mode, int outer_code_i, int opno,
{
case SET:
if (register_operand (SET_DEST (x), VOIDmode)
- && reg_or_0_operand (SET_SRC (x), VOIDmode))
+ && register_operand (SET_SRC (x), VOIDmode))
{
*total = ix86_set_reg_reg_cost (GET_MODE (SET_DEST (x)));
return true;
@@ -40581,20 +40581,10 @@ ix86_rtx_costs (rtx x, machine_mode mode, int outer_code_i, int opno,
case CONST:
case LABEL_REF:
case SYMBOL_REF:
- if (TARGET_64BIT && !x86_64_immediate_operand (x, VOIDmode))
- *total = 3;
- else if (TARGET_64BIT && !x86_64_zext_immediate_operand (x, VOIDmode))
- *total = 2;
- else if (flag_pic && SYMBOLIC_CONST (x)
- && !(TARGET_64BIT
- && (GET_CODE (x) == LABEL_REF
- || (GET_CODE (x) == SYMBOL_REF
- && SYMBOL_REF_LOCAL_P (x))))
- /* Use 0 cost for CONST to improve its propagation. */
- && (TARGET_64BIT || GET_CODE (x) != CONST))
- *total = 1;
- else
+ if (x86_64_immediate_operand (x, VOIDmode))
*total = 0;
+ else
+ *total = 1;
return true;
case CONST_DOUBLE: