diff options
| author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-07-09 19:41:54 +0000 |
|---|---|---|
| committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-07-09 19:41:54 +0000 |
| commit | efd4cd99a429aac82f7bac08f0756dab535a2581 (patch) | |
| tree | 44874c8e102a8391055f35199a18373413dd8626 | |
| parent | e46d7935d78d14a64b88f6fc335c850de30466c0 (diff) | |
| download | ppe42-gcc-efd4cd99a429aac82f7bac08f0756dab535a2581.tar.gz ppe42-gcc-efd4cd99a429aac82f7bac08f0756dab535a2581.zip | |
2007-07-09 Richard Guenther <rguenther@suse.de>
PR middle-end/32698
* fold-const.c (fold_plusminus_mult_expr): Move constant
arguments second to allow decomposing.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126494 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/fold-const.c | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8b3152b9cb7..802135b82c5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2007-07-09 Richard Guenther <rguenther@suse.de> + + PR middle-end/32698 + * fold-const.c (fold_plusminus_mult_expr): Move constant + arguments second to allow decomposing. + 2007-07-09 Alexandre Oliva <aoliva@oliva.athome.lsd.ic.unicamp.br> Revert: diff --git a/gcc/fold-const.c b/gcc/fold-const.c index e69945fcba4..652fd177fba 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -7122,6 +7122,11 @@ fold_plusminus_mult_expr (enum tree_code code, tree type, tree arg0, tree arg1) arg00 = TREE_OPERAND (arg0, 0); arg01 = TREE_OPERAND (arg0, 1); } + else if (TREE_CODE (arg0) == INTEGER_CST) + { + arg00 = build_one_cst (type); + arg01 = arg0; + } else { arg00 = arg0; @@ -7132,6 +7137,11 @@ fold_plusminus_mult_expr (enum tree_code code, tree type, tree arg0, tree arg1) arg10 = TREE_OPERAND (arg1, 0); arg11 = TREE_OPERAND (arg1, 1); } + else if (TREE_CODE (arg1) == INTEGER_CST) + { + arg10 = build_one_cst (type); + arg11 = arg1; + } else { arg10 = arg1; |

