diff options
Diffstat (limited to 'gcc/tree-ssa-pre.c')
-rw-r--r-- | gcc/tree-ssa-pre.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c index 0c1654f..7d67305 100644 --- a/gcc/tree-ssa-pre.c +++ b/gcc/tree-ssa-pre.c @@ -3571,6 +3571,16 @@ do_hoist_insertion (basic_block block) continue; } + /* If we end up with a punned expression representation and this + happens to be a float typed one give up - we can't know for + sure whether all paths perform the floating-point load we are + about to insert and on some targets this can cause correctness + issues. See PR88240. */ + if (expr->kind == REFERENCE + && PRE_EXPR_REFERENCE (expr)->punned + && FLOAT_TYPE_P (get_expr_type (expr))) + continue; + /* OK, we should hoist this value. Perform the transformation. */ pre_stats.hoist_insert++; if (dump_file && (dump_flags & TDF_DETAILS)) |