From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38554 invoked by alias); 13 Nov 2015 07:36:49 -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 38542 invoked by uid 89); 13 Nov 2015 07:36:49 -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-ob0-f173.google.com Received: from mail-ob0-f173.google.com (HELO mail-ob0-f173.google.com) (209.85.214.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 13 Nov 2015 07:36:48 +0000 Received: by obbbj7 with SMTP id bj7so48936856obb.1 for ; Thu, 12 Nov 2015 23:36:46 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.60.140.228 with SMTP id rj4mr12566088oeb.15.1447400206025; Thu, 12 Nov 2015 23:36:46 -0800 (PST) Received: by 10.60.138.6 with HTTP; Thu, 12 Nov 2015 23:36:45 -0800 (PST) Date: Fri, 13 Nov 2015 07:36:00 -0000 Message-ID: Subject: [PATCH, i386]: Check natural alignment of the operand in misaligned_operand predicate From: Uros Bizjak To: "gcc-patches@gcc.gnu.org" Cc: "H.J. Lu" Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2015-11/txt/msg01626.txt.bz2 Hello! We have to check natural alignment of the operand in misaligned_operand predicate. This predicate is used to check SSE memory operands for alignment, when movaps instead of movups can be used. This change makes predicate independent of BIGGEST_ALIGNMENT setting. 2015-11-13 Uros Bizjak * config/i386/predicates.md (misaligned_operand): Return true if operand is aligned to less than its natural alignmnet. Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}, committed to mainline SVN. Uros. Index: config/i386/predicates.md =================================================================== --- config/i386/predicates.md (revision 230213) +++ config/i386/predicates.md (working copy) @@ -1364,10 +1364,11 @@ (define_predicate "absneg_operator" (match_code "abs,neg")) -;; Return true if OP is misaligned memory operand +;; Return true if OP is a memory operand, aligned to +;; less than its natural alignment. (define_predicate "misaligned_operand" (and (match_code "mem") - (match_test "MEM_ALIGN (op) < GET_MODE_ALIGNMENT (mode)"))) + (match_test "MEM_ALIGN (op) < GET_MODE_BITSIZE (mode)"))) ;; Return true if OP is a emms operation, known to be a PARALLEL.