mirrored from git://gcc.gnu.org/git/gcc.git
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tree-optimization/79333 - fold stmts following SSA edges in VN
This makes sure to follow SSA edges when folding eliminated stmts. This reaps the same benefit as forwprop folding all stmts, not waiting for one to produce copysign in the new testcase. 2021-05-04 Richard Biener <rguenther@suse.de> PR tree-optimization/79333 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Fold stmt following SSA edges. * gcc.dg/tree-ssa/ssa-fre-94.c: New testcase. * gcc.dg/graphite/fuse-1.c: Adjust. * gcc.dg/pr43864-4.c: Likewise.
- Loading branch information
Showing
4 changed files
with
22 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* PR tree-optimization/79333 */ | ||
/* { dg-do compile } */ | ||
/* { dg-options "-O -ffinite-math-only -fdump-tree-fre1" } */ | ||
|
||
extern __inline __attribute__ ((__always_inline__,__gnu_inline__)) | ||
double __attribute__ ((__nothrow__ , __leaf__)) | ||
fabs (double __x) { return __builtin_fabs (__x); } | ||
|
||
double f(float f) | ||
{ | ||
double t1 = fabs(f); | ||
double t2 = f / t1; | ||
return t2; | ||
} | ||
|
||
/* { dg-final { scan-tree-dump "copysign" "fre1" } } */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters