From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28493 invoked by alias); 26 Feb 2015 08:48:35 -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 28410 invoked by uid 48); 26 Feb 2015 08:48:27 -0000 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/64946] [AArch64] gcc.target/aarch64/vect-abs-compile.c - "abs" vectorization fails for char/short types Date: Thu, 26 Feb 2015 10:07:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: vekumar at gcc dot gnu.org 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: 2015-02/txt/msg02886.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64946 --- Comment #8 from Andrew Pinski --- (In reply to vekumar from comment #6) > (In reply to Andrew Pinski from comment #5) > > I think you should always use an unsigned type here so it will be defined in > > the IR. This is mentioned in bug 22199#c3 . > > Andrew I missed to include something like this > > + (if (TYPE_OVERFLOW_WRAPS (TREE_TYPE (@0))) > + (convert (op @0 @1))) > > as in https://gcc.gnu.org/viewcvs?rev=220695&root=gcc&view=rev I did not miss that, I am just saying you should do it for types that have undefined overflow also but convert it into a type that wraps. Meaning you are not apply the full optimization really.