Commit bd74f4d8 by Richard Biener Committed by Richard Biener

re PR c/84190 (double arithmetic on x86 no longer rounds to nearest)

2018-02-16  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/84190
	* tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
	volatile accesses if the decl isn't volatile.

	* g++.dg/torture/pr84190.C: New testcase.

From-SVN: r257721
parent d78aecf4
2018-02-16 Richard Biener <rguenther@suse.de>
PR tree-optimization/84190
* tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
volatile accesses if the decl isn't volatile.
2018-02-15 Jason Merrill <jason@redhat.com>
PR c++/84314 - ICE with templates and fastcall attribute.
......
2018-02-16 Richard Biener <rguenther@suse.de>
PR tree-optimization/84190
* g++.dg/torture/pr84190.C: New testcase.
2018-02-15 Martin Sebor <msebor@redhat.com>
* gcc.dg/lto/README (dg-lto-warning, dg-lto-message): Document new
......
// { dg-do compile }
// For slim LTO there's no optimized dump
// { dg-skip-if "" { *-*-* } { "-flto" } { "" } }
// { dg-additional-options "-fdump-tree-optimized" }
typedef double T;
static int equalfn (volatile T* x, volatile T* y);
T gx, gy;
int main ()
{
T x = gx, y = gy;
return equalfn (&x, &y);
}
static int equalfn (volatile T* x, volatile T* y)
{
return (*x == *y);
}
// There should be exactly two volatile accesses (ignoring clobbers).
// { dg-final { scan-tree-dump-times " ={v} \[^\{\]" 2 "optimized" } }
......@@ -1427,7 +1427,8 @@ non_rewritable_mem_ref_base (tree ref)
if (! DECL_P (decl))
return NULL_TREE;
if (! is_gimple_reg_type (TREE_TYPE (base))
|| VOID_TYPE_P (TREE_TYPE (base)))
|| VOID_TYPE_P (TREE_TYPE (base))
|| TREE_THIS_VOLATILE (decl) != TREE_THIS_VOLATILE (base))
return decl;
if ((TREE_CODE (TREE_TYPE (decl)) == VECTOR_TYPE
|| TREE_CODE (TREE_TYPE (decl)) == COMPLEX_TYPE)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment