[cse][3/4] Don't overwrite original rtx when folding source of set
authorktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 4 Feb 2016 09:56:13 +0000 (09:56 +0000)
committerktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 4 Feb 2016 09:56:13 +0000 (09:56 +0000)
PR target/65932
PR target/67714
* cse.c (cse_insn): Pass NULL to fold_rtx when initially
folding the source of a SET.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233133 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/cse.c

index d5936b7..3e2f22a 100644 (file)
@@ -2,6 +2,13 @@
 
        PR target/65932
        PR target/67714
+       * cse.c (cse_insn): Pass NULL to fold_rtx when initially
+       folding the source of a SET.
+
+2016-02-04  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+       PR target/65932
+       PR target/67714
        * config/arm/arm.c (arm_new_rtx_costs, MULT case): Properly extract
        the operands of the SIGN_EXTENDs from a SMUL[TB][TB] rtx.
 
index 58b8fc0..2665d9a 100644 (file)
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -4636,7 +4636,7 @@ cse_insn (rtx_insn *insn)
 
       /* Simplify and foldable subexpressions in SRC.  Then get the fully-
         simplified result, which may not necessarily be valid.  */
-      src_folded = fold_rtx (src, insn);
+      src_folded = fold_rtx (src, NULL);
 
 #if 0
       /* ??? This caused bad code to be generated for the m68k port with -O2.