This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/86749] [9 Regression] Gcc miscompiles at -O3 with sse4 on valid code
- From: "rsandifo at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 01 Aug 2018 14:41:07 +0000
- Subject: [Bug tree-optimization/86749] [9 Regression] Gcc miscompiles at -O3 with sse4 on valid code
- Auto-submitted: auto-generated
- References: <bug-86749-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86749
--- Comment #2 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Author: rsandifo
Date: Wed Aug 1 14:40:35 2018
New Revision: 263213
URL: https://gcc.gnu.org/viewcvs?rev=263213&root=gcc&view=rev
Log:
Fix over-widening handling of COND_EXPRs (PR 86749)
This PR is a wrong-code bug caused by the over-widening support.
The minimum input precisions for a COND_EXPR are supposed to apply
only to the "then" and "else" values, but here we were applying
them to the operands of a nested COND_EXPR comparison instead.
2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
gcc/
PR tree-optimization/86749
* tree-vect-patterns.c (vect_determine_min_output_precision_1):
If the lhs is used in a COND_EXPR, check that it is being used
as the "then" or "else" value.
gcc/testsuite/
PR tree-optimization/86749
* gcc.dg/vect/pr86749.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/vect/pr86749.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-patterns.c