* [PATCH][mem-ref] Adjust some testsuite patterns
@ 2008-03-09 17:50 Richard Guenther
2008-03-09 18:02 ` Andrew Pinski
0 siblings, 1 reply; 3+ messages in thread
From: Richard Guenther @ 2008-03-09 17:50 UTC (permalink / raw)
To: gcc-patches
These are just false-positive fails.
Richard.
2008-03-09 Richard Guenther <rguenther@suse.de>
* gcc.dg/tree-ssa/20030530-2.c: Adjust patterns.
* gcc.dg/tree-ssa/20030703-2.c: Likewise.
* gcc.dg/tree-ssa/20030709-2.c: Likewise.
* gcc.dg/tree-ssa/20030709-3.c: Likewise.
* gcc.dg/tree-ssa/20030710-1.c: Likewise.
* gcc.dg/tree-ssa/20030711-2.c: Likewise.
* gcc.dg/tree-ssa/20030711-3.c: Likewise.
* gcc.dg/tree-ssa/20030729-1.c: Likewise.
* gcc.dg/tree-ssa/20030807-5.c: Likewise.
* gcc.dg/tree-ssa/20030814-1.c: Likewise.
* gcc.dg/tree-ssa/20030814-4.c: Likewise.
* gcc.dg/tree-ssa/20030814-5.c: Likewise.
* gcc.dg/tree-ssa/20031021-1.c: Likewise.
* gcc.dg/tree-ssa/20031022-1.c: Likewise.
* gcc.dg/tree-ssa/20040729-1.c: Likewise.
* gcc.dg/tree-ssa/20050314-1.c: Likewise.
* gcc.dg/tree-ssa/alias-6.c: Likewise.
* gcc.dg/tree-ssa/complex-3.c: Likewise.
* gcc.dg/tree-ssa/foldaddr-2.c: Likewise.
* gcc.dg/tree-ssa/foldaddr-3.c: Likewise.
Index: mem-ref/gcc/testsuite/gcc.dg/tree-ssa/20030530-2.c
===================================================================
*** mem-ref.orig/gcc/testsuite/gcc.dg/tree-ssa/20030530-2.c 2008-03-09 15:09:19.000000000 +0100
--- mem-ref/gcc/testsuite/gcc.dg/tree-ssa/20030530-2.c 2008-03-09 15:17:43.000000000 +0100
*************** rs6000_emit_prologue (int i, rs6000_stac
*** 16,26 ****
/* There should be precisely one load of first_gp_reg_save. If there is
more than one, then the dominator optimizations failed. */
! /* { dg-final { scan-tree-dump-times "first_gp_reg_save" 1 "dom3"} } */
/* There should be precisely one addition. If there is more than one, then
the dominator optimizations failed, most likely due to not handling
commutative operands correctly. */
/* { dg-final { scan-tree-dump-times "\\+" 1 "dom3"} } */
/* { dg-final { cleanup-tree-dump "dom3" } } */
--- 16,31 ----
/* There should be precisely one load of first_gp_reg_save. If there is
more than one, then the dominator optimizations failed. */
! /* { dg-final { scan-tree-dump-times "MEM <int .*, info" 1 "dom3"} } */
/* There should be precisely one addition. If there is more than one, then
the dominator optimizations failed, most likely due to not handling
commutative operands correctly. */
+ /* ??? MEM_REF: We have
+ D.1189_4 = D.1188_2 + i_3(D);
+ D.1193_5 = IDX <0 + D.1189_4 * 1>;
+ D.1190_6 = MEM <char {0}, ®s_ever_live + D.1193_5>;
+ and preserve IDX even for stride == 1 case. */
/* { dg-final { scan-tree-dump-times "\\+" 1 "dom3"} } */
/* { dg-final { cleanup-tree-dump "dom3" } } */
Index: mem-ref/gcc/testsuite/gcc.dg/tree-ssa/20030703-2.c
===================================================================
*** mem-ref.orig/gcc/testsuite/gcc.dg/tree-ssa/20030703-2.c 2008-03-09 15:18:10.000000000 +0100
--- mem-ref/gcc/testsuite/gcc.dg/tree-ssa/20030703-2.c 2008-03-09 15:20:37.000000000 +0100
*************** get_alias_set (t)
*** 29,35 ****
/* There should be precisely one load of {t,__t}->code. If there is
more than one, then the dominator optimizations failed. */
! /* { dg-final { scan-tree-dump-times "->code" 1 "dom3"} } */
/* There should be precisely one load of tree_code_type. If there is
more than one, then the dominator optimizations failed. */
--- 29,35 ----
/* There should be precisely one load of {t,__t}->code. If there is
more than one, then the dominator optimizations failed. */
! /* { dg-final { scan-tree-dump-times "MEM <int .*, t_" 1 "dom3"} } */
/* There should be precisely one load of tree_code_type. If there is
more than one, then the dominator optimizations failed. */
Index: mem-ref/gcc/testsuite/gcc.dg/tree-ssa/20030709-2.c
===================================================================
*** mem-ref.orig/gcc/testsuite/gcc.dg/tree-ssa/20030709-2.c 2008-03-09 15:21:00.000000000 +0100
--- mem-ref/gcc/testsuite/gcc.dg/tree-ssa/20030709-2.c 2008-03-09 15:22:33.000000000 +0100
*************** get_alias_set (t)
*** 41,52 ****
/* There should be precisely one load of ->decl.rtl. If there is
more than, then the dominator optimizations failed. */
! /* { dg-final { scan-tree-dump-times "->decl\\.rtl" 1 "cddce"} } */
!
! /* There should be no loads of .rtmem since the complex return statement
! is just "return 0". */
! /* { dg-final { scan-tree-dump-times ".rtmem" 0 "cddce"} } */
!
/* There should be one IF statement (the complex return statement should
collapse down to a simple return 0 without any conditionals). */
/* { dg-final { scan-tree-dump-times "if " 1 "cddce"} } */
--- 41,48 ----
/* There should be precisely one load of ->decl.rtl. If there is
more than, then the dominator optimizations failed. */
! /* { dg-final { scan-tree-dump-times "MEM" 1 "cddce"} } */
!
/* There should be one IF statement (the complex return statement should
collapse down to a simple return 0 without any conditionals). */
/* { dg-final { scan-tree-dump-times "if " 1 "cddce"} } */
Index: mem-ref/gcc/testsuite/gcc.dg/tree-ssa/20030709-3.c
===================================================================
*** mem-ref.orig/gcc/testsuite/gcc.dg/tree-ssa/20030709-3.c 2008-03-09 15:22:54.000000000 +0100
--- mem-ref/gcc/testsuite/gcc.dg/tree-ssa/20030709-3.c 2008-03-09 15:23:46.000000000 +0100
*************** record_component_aliases (type)
*** 36,46 ****
/* There should be precisely one load of type.binfo. If there is
more than one, then the dominator optimizations failed. */
! /* { dg-final { scan-tree-dump-times "type\\.binfo" 1 "dom3"} } */
/* There should be precisely one load of common.code. If there is
more than one, then the dominator optimizations failed. */
! /* { dg-final { scan-tree-dump-times "common\\.code" 1 "dom3"} } */
/* There should be one IF conditional. */
/* { dg-final { scan-tree-dump-times "if " 1 "dom3"} } */
--- 36,46 ----
/* There should be precisely one load of type.binfo. If there is
more than one, then the dominator optimizations failed. */
! /* { dg-final { scan-tree-dump-times "MEM <union tree_node" 1 "dom3"} } */
/* There should be precisely one load of common.code. If there is
more than one, then the dominator optimizations failed. */
! /* { dg-final { scan-tree-dump-times "MEM <int " 1 "dom3"} } */
/* There should be one IF conditional. */
/* { dg-final { scan-tree-dump-times "if " 1 "dom3"} } */
Index: mem-ref/gcc/testsuite/gcc.dg/tree-ssa/20030710-1.c
===================================================================
*** mem-ref.orig/gcc/testsuite/gcc.dg/tree-ssa/20030710-1.c 2008-03-09 15:25:10.000000000 +0100
--- mem-ref/gcc/testsuite/gcc.dg/tree-ssa/20030710-1.c 2008-03-09 15:28:48.000000000 +0100
*************** record_component_aliases (type)
*** 46,55 ****
/* There should be two IF conditionals. */
/* { dg-final { scan-tree-dump-times "if " 2 "dom3"} } */
! /* There should be a single load of type.binfo. */
! /* { dg-final { scan-tree-dump-times "type\\.binfo" 1 "dom3"} } */
/* There should be two loads of vec.length. */
! /* { dg-final { scan-tree-dump-times "vec.length" 2 "dom3"} } */
/* { dg-final { cleanup-tree-dump "dom3" } } */
--- 46,56 ----
/* There should be two IF conditionals. */
/* { dg-final { scan-tree-dump-times "if " 2 "dom3"} } */
! /* There should be two loads of a tree node, type.binfo and
! type.binfo->vec.a[4]. */
! /* { dg-final { scan-tree-dump-times "MEM <union tree_node" 2 "dom3"} } */
/* There should be two loads of vec.length. */
! /* { dg-final { scan-tree-dump-times "MEM <int " 2 "dom3"} } */
/* { dg-final { cleanup-tree-dump "dom3" } } */
Index: mem-ref/gcc/testsuite/gcc.dg/tree-ssa/20030711-2.c
===================================================================
*** mem-ref.orig/gcc/testsuite/gcc.dg/tree-ssa/20030711-2.c 2008-03-09 15:31:29.000000000 +0100
--- mem-ref/gcc/testsuite/gcc.dg/tree-ssa/20030711-2.c 2008-03-09 15:42:25.000000000 +0100
*************** get_alias_set (t,z)
*** 55,69 ****
/* { dg-final { scan-tree-dump-times "if " 3 "dom3"} } */
/* There should be one loads of decl.rtl. */
! /* { dg-final { scan-tree-dump-times "decl\\.rtl" 1 "dom3"} } */
! /* There should be one load of code. */
! /* { dg-final { scan-tree-dump-times "code" 1 "dom3"} } */
/* There should be one load of rtmem. */
! /* { dg-final { scan-tree-dump-times "rtmem" 1 "dom3"} } */
!
! /* There should be one load of alias. */
! /* { dg-final { scan-tree-dump-times "->alias" 1 "dom3"} } */
/* { dg-final { cleanup-tree-dump "dom3" } } */
--- 55,66 ----
/* { dg-final { scan-tree-dump-times "if " 3 "dom3"} } */
/* There should be one loads of decl.rtl. */
! /* { dg-final { scan-tree-dump-times "MEM <struct rtx_def " 1 "dom3"} } */
! /* There should be one load of code and one of alias. */
! /* { dg-final { scan-tree-dump-times "MEM <int \|MEM <long " 2 "dom3"} } */
/* There should be one load of rtmem. */
! /* { dg-final { scan-tree-dump-times "MEM <struct mem_attrs " 1 "dom3"} } */
/* { dg-final { cleanup-tree-dump "dom3" } } */
Index: mem-ref/gcc/testsuite/gcc.dg/tree-ssa/20030711-3.c
===================================================================
*** mem-ref.orig/gcc/testsuite/gcc.dg/tree-ssa/20030711-3.c 2008-03-09 15:34:31.000000000 +0100
--- mem-ref/gcc/testsuite/gcc.dg/tree-ssa/20030711-3.c 2008-03-09 15:42:40.000000000 +0100
*************** get_alias_set (t)
*** 50,61 ****
/* { dg-final { scan-tree-dump-times "if " 2 "dom3"} } */
/* There should be one load of decl.rtl. */
! /* { dg-final { scan-tree-dump-times "decl\\.rtl" 1 "dom3"} } */
/* There should be two loads of rtmem. */
! /* { dg-final { scan-tree-dump-times "rtmem" 2 "dom3"} } */
/* There should be one load of alias. */
! /* { dg-final { scan-tree-dump-times "->alias" 1 "dom3"} } */
/* { dg-final { cleanup-tree-dump "dom3" } } */
--- 50,61 ----
/* { dg-final { scan-tree-dump-times "if " 2 "dom3"} } */
/* There should be one load of decl.rtl. */
! /* { dg-final { scan-tree-dump-times "MEM <struct rtx_def" 1 "dom3"} } */
/* There should be two loads of rtmem. */
! /* { dg-final { scan-tree-dump-times "MEM <struct mem_attrs" 2 "dom3"} } */
/* There should be one load of alias. */
! /* { dg-final { scan-tree-dump-times "MEM <long \|MEM <int " 1 "dom3"} } */
/* { dg-final { cleanup-tree-dump "dom3" } } */
Index: mem-ref/gcc/testsuite/gcc.dg/tree-ssa/20030729-1.c
===================================================================
*** mem-ref.orig/gcc/testsuite/gcc.dg/tree-ssa/20030729-1.c 2008-03-09 15:43:17.000000000 +0100
--- mem-ref/gcc/testsuite/gcc.dg/tree-ssa/20030729-1.c 2008-03-09 15:46:14.000000000 +0100
*************** readonly_fields_p (type)
*** 45,54 ****
/* A good optimizer would realize that the cast to (unsigned int) is
useless as the earlier cast of the same value of (unsigned char) will
always produce the same result. */
! /* { dg-final { scan-tree-dump-times "\\(unsigned int\\)" 0 "dom3"} } */
! /* There should be one load of ->common.code. We currently fail this
! because we load from ->common.code using different types. */
! /* { dg-final { scan-tree-dump-times "common\.code" 1 "dom3"} } */
/* { dg-final { cleanup-tree-dump "dom3" } } */
--- 45,53 ----
/* A good optimizer would realize that the cast to (unsigned int) is
useless as the earlier cast of the same value of (unsigned char) will
always produce the same result. */
! /* { dg-final { scan-tree-dump-times "\\(unsigned int\\)" 0 "dom3" } } */
! /* There should be one load of ->common.code, two loads in total. */
! /* { dg-final { scan-tree-dump-times "MEM" 2 "dom3" } } */
/* { dg-final { cleanup-tree-dump "dom3" } } */
Index: mem-ref/gcc/testsuite/gcc.dg/tree-ssa/20030807-5.c
===================================================================
*** mem-ref.orig/gcc/testsuite/gcc.dg/tree-ssa/20030807-5.c 2008-03-09 15:46:34.000000000 +0100
--- mem-ref/gcc/testsuite/gcc.dg/tree-ssa/20030807-5.c 2008-03-09 16:13:26.000000000 +0100
*************** foo ()
*** 29,36 ****
}
/* There should be precisely one load of ->code. If there is
! more than, then the dominator optimizations failed. */
! /* { dg-final { scan-tree-dump-times "->code" 1 "dom3"} } */
/* There should be two IF statements. One for 'current_sym_addr->code == 42'.
The other one for '(EXPR)->unchanging'. */
--- 29,37 ----
}
/* There should be precisely one load of ->code. If there is
! more than, then the dominator optimizations failed.
! There are two loads in total, one for unchanging as well. */
! /* { dg-final { scan-tree-dump-times "MEM <" 2 "dom3"} } */
/* There should be two IF statements. One for 'current_sym_addr->code == 42'.
The other one for '(EXPR)->unchanging'. */
Index: mem-ref/gcc/testsuite/gcc.dg/tree-ssa/20030814-1.c
===================================================================
*** mem-ref.orig/gcc/testsuite/gcc.dg/tree-ssa/20030814-1.c 2008-03-09 15:48:08.000000000 +0100
--- mem-ref/gcc/testsuite/gcc.dg/tree-ssa/20030814-1.c 2008-03-09 15:49:09.000000000 +0100
*************** com(int *blah)
*** 16,21 ****
/* There should be precisely one load of blah. If there is
more than one, then the dominator optimizations failed. */
! /* { dg-final { scan-tree-dump-times "\\*blah" 1 "dom3"} } */
/* { dg-final { cleanup-tree-dump "dom3" } } */
--- 16,21 ----
/* There should be precisely one load of blah. If there is
more than one, then the dominator optimizations failed. */
! /* { dg-final { scan-tree-dump-times "MEM" 1 "dom3" } } */
/* { dg-final { cleanup-tree-dump "dom3" } } */
Index: mem-ref/gcc/testsuite/gcc.dg/tree-ssa/20030814-4.c
===================================================================
*** mem-ref.orig/gcc/testsuite/gcc.dg/tree-ssa/20030814-4.c 2008-03-09 15:49:25.000000000 +0100
--- mem-ref/gcc/testsuite/gcc.dg/tree-ssa/20030814-4.c 2008-03-09 15:51:45.000000000 +0100
*************** blah (decl, set)
*** 34,40 ****
/* There should be precisely one reference to pointer_alias_set. If there is
more than one, then the dominator optimizations failed. */
! /* { dg-final { scan-tree-dump-times "pointer_alias_set" 1 "dom3"} } */
/* { dg-final { cleanup-tree-dump "dom3" } } */
/* The assignment set = -1 in the ELSE clause of the last IF
--- 34,40 ----
/* There should be precisely one reference to pointer_alias_set. If there is
more than one, then the dominator optimizations failed. */
! /* { dg-final { scan-tree-dump-times "MEM <long " 1 "dom3"} } */
/* { dg-final { cleanup-tree-dump "dom3" } } */
/* The assignment set = -1 in the ELSE clause of the last IF
Index: mem-ref/gcc/testsuite/gcc.dg/tree-ssa/20030814-5.c
===================================================================
*** mem-ref.orig/gcc/testsuite/gcc.dg/tree-ssa/20030814-5.c 2008-03-09 15:52:12.000000000 +0100
--- mem-ref/gcc/testsuite/gcc.dg/tree-ssa/20030814-5.c 2008-03-09 15:52:40.000000000 +0100
*************** blah (decl, set)
*** 34,40 ****
/* There should be precisely one reference to pointer_alias_set. If there is
more than one, then the dominator optimizations failed. */
! /* { dg-final { scan-tree-dump-times "pointer_alias_set" 1 "dom3"} } */
/* { dg-final { cleanup-tree-dump "dom3" } } */
/* The assignment set = -1 in the ELSE clause of the last IF
--- 34,40 ----
/* There should be precisely one reference to pointer_alias_set. If there is
more than one, then the dominator optimizations failed. */
! /* { dg-final { scan-tree-dump-times "MEM <long " 1 "dom3"} } */
/* { dg-final { cleanup-tree-dump "dom3" } } */
/* The assignment set = -1 in the ELSE clause of the last IF
Index: mem-ref/gcc/testsuite/gcc.dg/tree-ssa/20031021-1.c
===================================================================
*** mem-ref.orig/gcc/testsuite/gcc.dg/tree-ssa/20031021-1.c 2008-03-09 15:53:00.000000000 +0100
--- mem-ref/gcc/testsuite/gcc.dg/tree-ssa/20031021-1.c 2008-03-09 15:53:35.000000000 +0100
*************** int main()
*** 17,21 ****
}
/* We should only store to a.i, not load from it. */
! /* { dg-final { scan-tree-dump-times "a.i" 1 "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
--- 17,21 ----
}
/* We should only store to a.i, not load from it. */
! /* { dg-final { scan-tree-dump-times "MEM <.*, &a" 1 "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
Index: mem-ref/gcc/testsuite/gcc.dg/tree-ssa/20031022-1.c
===================================================================
*** mem-ref.orig/gcc/testsuite/gcc.dg/tree-ssa/20031022-1.c 2008-03-09 15:03:49.000000000 +0100
--- mem-ref/gcc/testsuite/gcc.dg/tree-ssa/20031022-1.c 2008-03-09 15:05:26.000000000 +0100
*************** blah (int arf)
*** 24,28 ****
}
/* There should be one load from entry_exit_blocks[1].pred. */
! /* { dg-final { scan-tree-dump-times "entry_exit_blocks.1..pred" 1 "dom1"} } */
/* { dg-final { cleanup-tree-dump "dom1" } } */
--- 24,28 ----
}
/* There should be one load from entry_exit_blocks[1].pred. */
! /* { dg-final { scan-tree-dump-times "MEM <.*, &entry_exit_blocks" 1 "dom1" } } */
/* { dg-final { cleanup-tree-dump "dom1" } } */
Index: mem-ref/gcc/testsuite/gcc.dg/tree-ssa/20040729-1.c
===================================================================
*** mem-ref.orig/gcc/testsuite/gcc.dg/tree-ssa/20040729-1.c 2008-03-09 15:56:18.000000000 +0100
--- mem-ref/gcc/testsuite/gcc.dg/tree-ssa/20040729-1.c 2008-03-09 16:15:17.000000000 +0100
*************** foo ()
*** 15,19 ****
compiler was mistakenly thinking that the statement had volatile
operands. But 'p' itself is not volatile and taking the address of
a volatile does not constitute a volatile operand. */
! /* { dg-final { scan-tree-dump-times "&x" 0 "dce3"} } */
/* { dg-final { cleanup-tree-dump "dce3" } } */
--- 15,19 ----
compiler was mistakenly thinking that the statement had volatile
operands. But 'p' itself is not volatile and taking the address of
a volatile does not constitute a volatile operand. */
! /* { dg-final { scan-tree-dump-times "MEM <volatile int ..., \&x" 2 "dce3"} } */
/* { dg-final { cleanup-tree-dump "dce3" } } */
Index: mem-ref/gcc/testsuite/gcc.dg/tree-ssa/20050314-1.c
===================================================================
*** mem-ref.orig/gcc/testsuite/gcc.dg/tree-ssa/20050314-1.c 2008-03-09 15:58:28.000000000 +0100
--- mem-ref/gcc/testsuite/gcc.dg/tree-ssa/20050314-1.c 2008-03-09 15:59:26.000000000 +0100
*************** void xxx (void)
*** 17,21 ****
/* Store motion may be applied to the assignment to a[k], since sinf
cannot read nor write the memory. */
! /* { dg-final { scan-tree-dump-times "Moving statement" 1 "lim" } } */
/* { dg-final { cleanup-tree-dump "lim" } } */
--- 17,21 ----
/* Store motion may be applied to the assignment to a[k], since sinf
cannot read nor write the memory. */
! /* { dg-final { scan-tree-dump-times "Executing store motion" 1 "lim" } } */
/* { dg-final { cleanup-tree-dump "lim" } } */
Index: mem-ref/gcc/testsuite/gcc.dg/tree-ssa/alias-6.c
===================================================================
*** mem-ref.orig/gcc/testsuite/gcc.dg/tree-ssa/alias-6.c 2008-03-09 16:07:51.000000000 +0100
--- mem-ref/gcc/testsuite/gcc.dg/tree-ssa/alias-6.c 2008-03-09 16:19:15.000000000 +0100
*************** int bar(void)
*** 14,19 ****
return a[0] + *p.a;
}
! /* { dg-final { scan-tree-dump "return \\*p\\.a \\\+ a.0.;" "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
--- 14,19 ----
return a[0] + *p.a;
}
! /* { dg-final { scan-tree-dump "MEM <int ..., MEM <int \\\* ..., \\\&p>> \\\+ MEM <int ..., \\\&a>;" "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
Index: mem-ref/gcc/testsuite/gcc.dg/tree-ssa/complex-3.c
===================================================================
*** mem-ref.orig/gcc/testsuite/gcc.dg/tree-ssa/complex-3.c 2008-03-09 16:08:20.000000000 +0100
--- mem-ref/gcc/testsuite/gcc.dg/tree-ssa/complex-3.c 2008-03-09 16:17:52.000000000 +0100
*************** float imag_part(COMPLEX_FLOAT a)
*** 18,27 ****
return ((float*)(&a))[1];
}
! /* Test that the above gets optimized to REALPART_EXPR and IMAGPART_EXPR
! respectively. */
! /* { dg-final { scan-tree-dump-times "REALPART_EXPR" 2 "optimized" } } */
! /* { dg-final { scan-tree-dump-times "IMAGPART_EXPR" 1 "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
--- 18,26 ----
return ((float*)(&a))[1];
}
! /* Test that the above gets optimized to proper float loads. */
! /* { dg-final { scan-tree-dump-times "MEM <float " 3 "optimized" } } */
! /* { dg-final { scan-tree-dump-times "\\\&a \\\+ 4" 1 "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
Index: mem-ref/gcc/testsuite/gcc.dg/tree-ssa/foldaddr-2.c
===================================================================
*** mem-ref.orig/gcc/testsuite/gcc.dg/tree-ssa/foldaddr-2.c 2008-03-09 16:10:04.000000000 +0100
--- mem-ref/gcc/testsuite/gcc.dg/tree-ssa/foldaddr-2.c 2008-03-09 16:10:51.000000000 +0100
*************** t()
*** 9,13 ****
{
return (int *)&a;
}
! /* { dg-final { scan-tree-dump "a.a" "optimized"} } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
--- 9,13 ----
{
return (int *)&a;
}
! /* { dg-final { scan-tree-dump "return &a;" "optimized"} } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
Index: mem-ref/gcc/testsuite/gcc.dg/tree-ssa/foldaddr-3.c
===================================================================
*** mem-ref.orig/gcc/testsuite/gcc.dg/tree-ssa/foldaddr-3.c 2008-03-09 16:11:11.000000000 +0100
--- mem-ref/gcc/testsuite/gcc.dg/tree-ssa/foldaddr-3.c 2008-03-09 16:11:23.000000000 +0100
*************** t ()
*** 24,28 ****
return (int *) &a;
}
! /* { dg-final { scan-tree-dump "a.s2.c" "optimized"} } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
--- 24,28 ----
return (int *) &a;
}
! /* { dg-final { scan-tree-dump "return &a;" "optimized"} } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][mem-ref] Adjust some testsuite patterns
2008-03-09 17:50 [PATCH][mem-ref] Adjust some testsuite patterns Richard Guenther
@ 2008-03-09 18:02 ` Andrew Pinski
2008-03-09 18:16 ` Richard Guenther
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Pinski @ 2008-03-09 18:02 UTC (permalink / raw)
To: Richard Guenther; +Cc: gcc-patches
Hi,
Some comments/questions.
On Sun, Mar 9, 2008 at 10:50 AM, Richard Guenther <rguenther@suse.de> wrote:
> Index: mem-ref/gcc/testsuite/gcc.dg/tree-ssa/complex-3.c
> ===================================================================
> *** mem-ref.orig/gcc/testsuite/gcc.dg/tree-ssa/complex-3.c 2008-03-09 16:08:20.000000000 +0100
> --- mem-ref/gcc/testsuite/gcc.dg/tree-ssa/complex-3.c 2008-03-09 16:17:52.000000000 +0100
> *************** float imag_part(COMPLEX_FLOAT a)
> *** 18,27 ****
> return ((float*)(&a))[1];
> }
>
> ! /* Test that the above gets optimized to REALPART_EXPR and IMAGPART_EXPR
> ! respectively. */
>
> ! /* { dg-final { scan-tree-dump-times "REALPART_EXPR" 2 "optimized" } } */
> ! /* { dg-final { scan-tree-dump-times "IMAGPART_EXPR" 1 "optimized" } } */
> /* { dg-final { cleanup-tree-dump "optimized" } } */
>
> --- 18,26 ----
> return ((float*)(&a))[1];
> }
>
> ! /* Test that the above gets optimized to proper float loads. */
>
> ! /* { dg-final { scan-tree-dump-times "MEM <float " 3 "optimized" } } */
> ! /* { dg-final { scan-tree-dump-times "\\\&a \\\+ 4" 1 "optimized" } } */
> /* { dg-final { cleanup-tree-dump "optimized" } } */
We should not be taking the address of a here. This is not a false
positive at all. REALPART_EXPR/IMAGPART_EXPR should not require the
address of the variable taken. Right? If you do now, then I think
you need to think that as we really don't want extra addressable
variables on the rtl level. Now if we don't fold it to
REALPART_EXPR/IMAGPART_EXPR, then something is really wrong and the
testcase should not be changed at all.
>
> Index: mem-ref/gcc/testsuite/gcc.dg/tree-ssa/foldaddr-2.c
> ===================================================================
> *** mem-ref.orig/gcc/testsuite/gcc.dg/tree-ssa/foldaddr-2.c 2008-03-09 16:10:04.000000000 +0100
> --- mem-ref/gcc/testsuite/gcc.dg/tree-ssa/foldaddr-2.c 2008-03-09 16:10:51.000000000 +0100
> *************** t()
> *** 9,13 ****
> {
> return (int *)&a;
> }
> ! /* { dg-final { scan-tree-dump "a.a" "optimized"} } */
> /* { dg-final { cleanup-tree-dump "optimized" } } */
> --- 9,13 ----
> {
> return (int *)&a;
> }
> ! /* { dg-final { scan-tree-dump "return &a;" "optimized"} } */
> /* { dg-final { cleanup-tree-dump "optimized" } } */
> Index: mem-ref/gcc/testsuite/gcc.dg/tree-ssa/foldaddr-3.c
> ===================================================================
> *** mem-ref.orig/gcc/testsuite/gcc.dg/tree-ssa/foldaddr-3.c 2008-03-09 16:11:11.000000000 +0100
> --- mem-ref/gcc/testsuite/gcc.dg/tree-ssa/foldaddr-3.c 2008-03-09 16:11:23.000000000 +0100
> *************** t ()
> *** 24,28 ****
> return (int *) &a;
> }
>
> ! /* { dg-final { scan-tree-dump "a.s2.c" "optimized"} } */
> /* { dg-final { cleanup-tree-dump "optimized" } } */
> --- 24,28 ----
> return (int *) &a;
> }
>
> ! /* { dg-final { scan-tree-dump "return &a;" "optimized"} } */
> /* { dg-final { cleanup-tree-dump "optimized" } } */
>
These 2 above testcases should be just removed as they no longer test
what they were testing for anymore, that is the folding into the take
the address of the first field of the struct.
Thanks,
Andrew Pinski
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][mem-ref] Adjust some testsuite patterns
2008-03-09 18:02 ` Andrew Pinski
@ 2008-03-09 18:16 ` Richard Guenther
0 siblings, 0 replies; 3+ messages in thread
From: Richard Guenther @ 2008-03-09 18:16 UTC (permalink / raw)
To: Andrew Pinski; +Cc: gcc-patches
On Sun, 9 Mar 2008, Andrew Pinski wrote:
> Hi,
> Some comments/questions.
>
> > ! /* { dg-final { scan-tree-dump-times "MEM <float " 3 "optimized" } } */
> > ! /* { dg-final { scan-tree-dump-times "\\\&a \\\+ 4" 1 "optimized" } } */
> > /* { dg-final { cleanup-tree-dump "optimized" } } */
>
> We should not be taking the address of a here. This is not a false
> positive at all. REALPART_EXPR/IMAGPART_EXPR should not require the
> address of the variable taken. Right? If you do now, then I think
> you need to think that as we really don't want extra addressable
> variables on the rtl level. Now if we don't fold it to
> REALPART_EXPR/IMAGPART_EXPR, then something is really wrong and the
> testcase should not be changed at all.
You are right, I have reverted that change.
Thanks for noticing.
I also deleted the two foldaddr testcases.
Richard.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-03-09 18:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-09 17:50 [PATCH][mem-ref] Adjust some testsuite patterns Richard Guenther
2008-03-09 18:02 ` Andrew Pinski
2008-03-09 18:16 ` Richard Guenther
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).