diff options
author | Richard Biener <rguenther@suse.de> | 2015-07-22 11:31:50 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2015-07-22 11:31:50 +0000 |
commit | 8bb8e838416dce451fae352df5198f99e5f84da5 (patch) | |
tree | 2b717adaafe8433027ff31c83f676589f58cf74b /gcc/testsuite | |
parent | b1db706aba296e3bbb369102a540169315888dce (diff) | |
download | gcc-8bb8e838416dce451fae352df5198f99e5f84da5.zip gcc-8bb8e838416dce451fae352df5198f99e5f84da5.tar.gz gcc-8bb8e838416dce451fae352df5198f99e5f84da5.tar.bz2 |
re PR tree-optimization/66952 (wrong code at -O2 and -O3 on x86_64-linux-gnu)
2015-07-22 Richard Biener <rguenther@suse.de>
PR tree-optimization/66952
* tree-ssa-ifcombine.c (pass_tree_ifcombine::execute): For
blocks we end up executing unconditionally reset all SSA
info such as range and alignment.
* tree-ssanames.h (reset_flow_sensitive_info): Declare.
* tree-ssanames.c (reset_flow_sensitive_info): New function.
* gcc.dg/torture/pr66952.c: New testcase.
From-SVN: r226062
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr66952.c | 28 |
2 files changed, 33 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8080308..f4eb4c9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-07-22 Richard Biener <rguenther@suse.de> + + PR tree-optimization/66952 + * gcc.dg/torture/pr66952.c: New testcase. + 2015-07-22 Charles Baylis <charles.baylis@linaro.org> * gcc.target/aarch64/advsimd-intrinsics/vld2_lane_f32_indices_1.c: New diff --git a/gcc/testsuite/gcc.dg/torture/pr66952.c b/gcc/testsuite/gcc.dg/torture/pr66952.c new file mode 100644 index 0000000..2a98d2e --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr66952.c @@ -0,0 +1,28 @@ +/* { dg-do run } */ + +int a = 128, b; + +static int +fn1 (char p1, int p2) +{ + return p1 < 0 || p1 > 1 >> p2 ? 0 : p1 << 1; +} + +static int +fn2 () +{ + char c = a; + b = fn1 (c, 1); + if ((128 | c) < 0 ? 1 : 0) + return 1; + return 0; +} + +int +main () +{ + if (fn2 () != 1) + __builtin_abort (); + + return 0; +} |