[Bug target/86994] [9 regression] 64-bit gcc.target/i386/20040112-1.c FAILs

2018-08-19 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86994

Uroš Bizjak  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Assignee|unassigned at gcc dot gnu.org  |ubizjak at gmail dot com

--- Comment #4 from Uroš Bizjak  ---
Fixed.

[Bug target/86994] [9 regression] 64-bit gcc.target/i386/20040112-1.c FAILs

2018-08-19 Thread uros at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86994

--- Comment #3 from uros at gcc dot gnu.org ---
Author: uros
Date: Sun Aug 19 19:10:37 2018
New Revision: 263652

URL: https://gcc.gnu.org/viewcvs?rev=263652=gcc=rev
Log:
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.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c

[Bug target/86994] [9 regression] 64-bit gcc.target/i386/20040112-1.c FAILs

2018-08-18 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86994

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||missed-optimization

--- Comment #2 from Andrew Pinski  ---
>The canonicalization, introduced in r263591 does not universally benefit all 
>targets.
As mentioned in the thread, there is no canonicalization but there a checking
of the cost.  If x86 cost model is incorrect, you would get the incorrect thing
here.

[Bug target/86994] [9 regression] 64-bit gcc.target/i386/20040112-1.c FAILs

2018-08-18 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86994

Uroš Bizjak  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-08-18
 CC||law at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Uroš Bizjak  ---
It is r263591:

2018-08-16  Vlad Lazar  

* expmed.h (canonicalize_comparison): New declaration.
* expmed.c (canonicalize_comparison, equivalent_cmp_code): New
function.
* expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
* optabs.c (prepare_cmp_insn): Likewise.
* rtl.h (unsigned_condition_p): New function which checks if a
comparison operator is unsigned.

That now expands with:

(insn 12 8 13 4 (set (reg:CCGC 17 flags)
(compare:CCGC (reg/v:QI 87 [ status ])
(const_int -1 [0x]))) "20040112-1.c":13 9
{*cmpqi_1}
 (nil))

instead of:

(insn 10 8 11 4 (set (reg:CCGOC 17 flags)
(compare:CCGOC (reg/v:QI 87 [ status ])
(const_int 0 [0]))) "20040112-1.c":13 5 {*cmpqi_ccno_1}
 (nil))

The canonicalization, introduced in r263591 does not universally benefit all
targets. I wonder why TARGET_CANONICALIZE_COMPARISON hook was not used instead.

[Bug target/86994] [9 regression] 64-bit gcc.target/i386/20040112-1.c FAILs

2018-08-17 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86994

Rainer Orth  changed:

   What|Removed |Added

   Target Milestone|--- |9.0