This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Remove inefficient branchless conditional negate optimization


On Fri, Mar 6, 2015 at 8:36 AM, Jiong Wang <jiong.wang@arm.com> wrote:
>
> Wilco Dijkstra writes:
>
>>> Jeff Law wrote:
>>> Can you move pr45685.c into gcc.target/i386?
>>>
>>> I know Richi said next stage1, but given this fixes a performance
>>> regression for ARM and it's reverting rather than adding new code, I
>>> think this is OK for the trunk with the testcase moved.
>>>
>>> So, OK with the testcase moved into gcc.target/i386/
>>
>> I've moved it and changed the compile condition:
>>
>> /* { dg-do compile { target { ! { ia32 } } } } */
>>
>> Jiong, can you commit this please?
>
> Done as 221246.
>
>>
>> Wilco
>>
>> 2015-03-06  Wilco Dijkstra  <wdijkstr@arm.com>
>>
>>       * gcc/tree-ssa-phiopt.c (neg_replacement): Remove.
>>       (tree_ssa_phiopt_worker): Remove negate optimization.
>>       * gcc/testsuite/gcc.dg/tree-ssa/pr45685.c: Move to gcc.target/i386.
>>       * gcc/testsuite/gcc.target/aarch64/csneg-1.c (test_csneg_cmp):
>>       New test.
>>       * gcc/gcc.target/i386/pr45685.c: Moved test, check for conditional
>>       move on x64.
>

I checked in this as an obvious fix to make it pass on x32.


-- 
H.J.
---
Index: ChangeLog
===================================================================
--- ChangeLog (revision 221254)
+++ ChangeLog (working copy)
@@ -1,3 +1,9 @@
+2015-03-07  H.J. Lu  <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/pr45685.c (uint64_t): Replace long with long
+ long.
+ (int64_t): Likewise.
+
 2015-03-07  Marek Polacek  <polacek@redhat.com>
     Martin Uecker  <uecker@eecs.berkeley.edu>

Index: gcc.target/i386/pr45685.c
===================================================================
--- gcc.target/i386/pr45685.c (revision 221254)
+++ gcc.target/i386/pr45685.c (working copy)
@@ -1,8 +1,8 @@
 /* { dg-do compile { target { ! { ia32 } } } } */
 /* { dg-options "-O3" } */

-typedef unsigned long int uint64_t;
-typedef long int int64_t;
+typedef unsigned long long int uint64_t;
+typedef long long int int64_t;
 int summation_helper_1(int64_t* products, uint64_t count)
 {
  int s = 0;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]