From patchwork Tue May 21 17:03:54 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 245364 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 442852C007E for ; Wed, 22 May 2013 03:04:04 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:date:message-id:subject:from:to:cc:content-type; q=dns; s=default; b=lKw+E2dgqV/63GHAV8JrIirfBqkJvG435d5viRPmqLb u5ch7XHdMlfrfGHajPPEHtB1R622biftikeZq51tp5JOFlZawO7StJY+4kOCFwow TRNabwzzSKEvp6+DVnNWLaK2qWPSp5OsMU8Om3hiFUzScTFlnhMGI8HzFS61hqQg = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:date:message-id:subject:from:to:cc:content-type; s=default; bh=TMUcSYzBezepqs2q+fx4hhTQf8Y=; b=Dpsd/VYXeXMCdCks8 5KjY0DCmIYrYPriUcerog89nF0hruTOakYW1dqUngDvnCozJYp4zr2nIskuttcJK ywbSLAZkcs6pmANyv5sSKkJDWRUykDzeeiOrUcsCtWexS4xgSY7KYvS979jDc15a E3ho1fGdNx765xi0pm8vgHa1vc= Received: (qmail 26763 invoked by alias); 21 May 2013 17:03:56 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 26752 invoked by uid 89); 21 May 2013 17:03:56 -0000 X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, SPF_PASS, TW_ZJ autolearn=ham version=3.3.1 Received: from mail-da0-f47.google.com (HELO mail-da0-f47.google.com) (209.85.210.47) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 21 May 2013 17:03:55 +0000 Received: by mail-da0-f47.google.com with SMTP id k13so544808dae.6 for ; Tue, 21 May 2013 10:03:54 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.68.180.4 with SMTP id dk4mr3693073pbc.104.1369155834390; Tue, 21 May 2013 10:03:54 -0700 (PDT) Received: by 10.70.2.164 with HTTP; Tue, 21 May 2013 10:03:54 -0700 (PDT) Date: Tue, 21 May 2013 19:03:54 +0200 Message-ID: Subject: [4.8 PATCH, i386]: Fix PR 57356, SSE2 instructions generated with '-mno-sse2' From: Uros Bizjak To: "gcc-patches@gcc.gnu.org" Cc: Jakub Jelinek X-Virus-Found: No Hello! This patch avoids movdqu/movdqa when SSE2 is disabled. Although -mno-sse2 is bordering on ABI violation for 64bit targets, the patch is simple enough to fix movti_internal_rex64 pattern. 2013-05-21 Uros Bizjak PR target/57356 * config/i386/i386.md (*movti_internal_rex64): Emit movaps/movups for non-sse2 targets. Tested on x86_64-pc-linux-gnu {,-m32}. OK for 4.8 branch? (The patch is also needed for 4.7 branch, but not for mainline, where this problem is fixed by movti_internal/movti_internal_rex64 merge). Uros. Index: config/i386/i386.md =================================================================== --- config/i386/i386.md (revision 199017) +++ config/i386/i386.md (working copy) @@ -1805,7 +1805,8 @@ (const_string "V4SF") (match_test "TARGET_AVX") (const_string "TI") - (match_test "optimize_function_for_size_p (cfun)") + (ior (not (match_test "TARGET_SSE2")) + (match_test "optimize_function_for_size_p (cfun)")) (const_string "V4SF") ] (const_string "TI")))])