From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27568 invoked by alias); 5 Dec 2014 10:07:32 -0000 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 Received: (qmail 27523 invoked by uid 48); 5 Dec 2014 10:07:29 -0000 From: "enkovich.gnu at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/64003] valgrind complains about get_attr_length_nobnd in insn-attrtab.c from i386.md Date: Fri, 05 Dec 2014 10:07: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-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: enkovich.gnu at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: enkovich.gnu at gmail dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-12/txt/msg00533.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64003 --- Comment #21 from Ilya Enkovich --- (In reply to Jeffrey A. Law from comment #20) > Ilya, it's the function call in this code I think: > > (cond [(eq_attr "length_nobnd" "!0") > (plus (symbol_ref ("ix86_bnd_prefixed_insn_p (insn)")) > (attr "length_nobnd")) > > You're calling out to ix86_bnd_prefixed_insn_p, and that's problematical for > branch shortening if I'm understanding Joern's comments here and David's > comments in the PA port correctly. Then we have three problematic patterns and the easiest way to handle it is to get rid of ix86_bnd_prefixed_insn_p call in length computation for them. I think the easiest way to do it is to have separate bnd and nobnd patterns for these instructions. Attached patch helps me to resolve valgrind error. Is such approach fine?