From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 43811 invoked by alias); 3 Aug 2015 12:33:10 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 43801 invoked by uid 89); 3 Aug 2015 12:33:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oi0-f41.google.com Received: from mail-oi0-f41.google.com (HELO mail-oi0-f41.google.com) (209.85.218.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 03 Aug 2015 12:33:08 +0000 Received: by oihn130 with SMTP id n130so1297406oih.2 for ; Mon, 03 Aug 2015 05:33:06 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.202.240.215 with SMTP id o206mr15384526oih.94.1438605186392; Mon, 03 Aug 2015 05:33:06 -0700 (PDT) Received: by 10.60.58.41 with HTTP; Mon, 3 Aug 2015 05:33:06 -0700 (PDT) Date: Mon, 03 Aug 2015 12:33:00 -0000 Message-ID: Subject: Re: [PATCH][RTL-ifcvt] Improve conditional select ops on immediates From: Uros Bizjak To: "gcc-patches@gcc.gnu.org" Cc: Kyrill Tkachov , Jeff Law , "H.J. Lu" Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2015-08/txt/msg00056.txt.bz2 Hello! > 2015-07-30 Kyrylo Tkachov > > * ifcvt.c (noce_try_store_flag_constants): Make logic of the case > when diff == STORE_FLAG_VALUE or diff == -STORE_FLAG_VALUE more > explicit. Prefer to add the flag whenever possible. > (noce_process_if_block): Try noce_try_store_flag_constants before > noce_try_cmove. > > 2015-07-30 Kyrylo Tkachov > > * gcc.target/aarch64/csel_bfx_1.c: New test. > * gcc.target/aarch64/csel_imms_inc_1.c: Likewise. This patch regressed following tests on x86_64: FAIL: gcc.target/i386/cmov2.c scan-assembler sbb FAIL: gcc.target/i386/cmov3.c scan-assembler cmov[^3] While cmov3 case is questionable by itself in light of PR56309 [1], the cnov2 case regressed from: cmpl %edi, %esi sbbl %eax, %eax andl $-10, %eax addl $5, %eax ret to: xorl %eax, %eax cmpl %esi, %edi setbe %al negl %eax andl $10, %eax subl $5, %eax ret Please note that sbb (aka {*x86_movsicc_0_m1} ) is not generated anymore. Non-QImode setcc instructions are problematic on x86, since they need to be zero-extended to their full length. [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56309 Uros.