From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29587 invoked by alias); 1 Sep 2012 16:59:35 -0000 Received: (qmail 29563 invoked by uid 22791); 1 Sep 2012 16:59:34 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 01 Sep 2012 16:59:21 +0000 From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/54445] TLS array lookup with negative constant is not combined into a single instruction Date: Sat, 01 Sep 2012 16:59:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-09/txt/msg00039.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54445 --- Comment #3 from H.J. Lu 2012-09-01 16:59:20 UTC --- I am testing this patch: diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md index c78384b..ee7ae49 100644 --- a/gcc/config/i386/predicates.md +++ b/gcc/config/i386/predicates.md @@ -228,8 +228,7 @@ { case UNSPEC_DTPOFF: case UNSPEC_NTPOFF: - if (offset > 0 - && trunc_int_for_mode (offset, SImode) == offset) + if (trunc_int_for_mode (offset, SImode) == offset) return true; } break;