[Bug target/80706] [7/8 Regression] peephole2 uses uninitialized stack variables on i686
ubizjak at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu May 11 08:12:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80706
--- Comment #7 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Uroš Bizjak from comment #5)
--cut here--
diff --git a/gcc/config/i386/sync.md b/gcc/config/i386/sync.md
index 20d46fe..895a1ea 100644
--- a/gcc/config/i386/sync.md
+++ b/gcc/config/i386/sync.md
@@ -222,7 +222,8 @@
"!TARGET_64BIT
&& peep2_reg_dead_p (2, operands[0])
&& rtx_equal_p (operands[4], adjust_address_nv (operands[2], DFmode, 0))"
- [(set (match_dup 3) (match_dup 5))]
+ [(set (match_dup 3) (match_dup 5))
+ (set (match_dup 4) (match_dup 3))]
"operands[5] = gen_lowpart (DFmode, operands[1]);")
(define_peephole2
@@ -235,7 +236,8 @@
"!TARGET_64BIT
&& peep2_reg_dead_p (2, operands[0])
&& rtx_equal_p (operands[4], adjust_address_nv (operands[2], DFmode, 0))"
- [(set (match_dup 3) (match_dup 5))]
+ [(set (match_dup 3) (match_dup 5))
+ (set (match_dup 4) (match_dup 3))]
"operands[5] = gen_lowpart (DFmode, operands[1]);")
(define_expand "atomic_store<mode>"
@@ -338,7 +340,8 @@
"!TARGET_64BIT
&& peep2_reg_dead_p (3, operands[2])
&& rtx_equal_p (operands[0], adjust_address_nv (operands[3], DFmode, 0))"
- [(set (match_dup 5) (match_dup 1))]
+ [(set (match_dup 5) (match_dup 1))
+ (set (match_dup 0) (match_dup 1))]
"operands[5] = gen_lowpart (DFmode, operands[4]);")
(define_peephole2
@@ -351,7 +354,8 @@
"!TARGET_64BIT
&& peep2_reg_dead_p (3, operands[2])
&& rtx_equal_p (operands[0], adjust_address_nv (operands[3], DFmode, 0))"
- [(set (match_dup 5) (match_dup 1))]
+ [(set (match_dup 5) (match_dup 1))
+ (set (match_dup 0) (match_dup 1))]
"operands[5] = gen_lowpart (DFmode, operands[4]);")
;; ??? You'd think that we'd be able to perform this via FLOAT + FIX_TRUNC
--cut here--
> Jakub, does the above patch fix the failure?
Bah, cut-n-pasto... the above should be correct patch.
More information about the Gcc-bugs
mailing list