Test testcase fail on tiny model, it's because single "ldr" generated to address got entry of "bar", while the early RTL PRE pass has done the IV hoisting, so loop IV will do nothing, thus we should restrict this testcase under small model.
For large model, -fpic is unsupported on AArch64, while for absolute address, anchor used, single "ldr" generated, IV hoisted by PRE pass also, in either case, this testcase doesn't apply, we should skip it thus. Committed attach patch as obivious. 2015-07-20 Jiong Wang <jiong.w...@arm.com> gcc/testsuite/ * gcc.target/aarch64/got_mem_hoist.c (dg-skip-if): Skip tiny and large model. -- Regards, Jiong
diff --git a/gcc/testsuite/gcc.target/aarch64/got_mem_hoist_1.c b/gcc/testsuite/gcc.target/aarch64/got_mem_hoist_1.c index 6d29718..2d8c8ae 100644 --- a/gcc/testsuite/gcc.target/aarch64/got_mem_hoist_1.c +++ b/gcc/testsuite/gcc.target/aarch64/got_mem_hoist_1.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fpic -fdump-rtl-loop2_invariant" } */ +/* { dg-skip-if "Load/Store hoisted by RTL PRE already" { aarch64-*-* } { "-mcmodel=tiny" "-mcmodel=large" } { "" } } */ int bar (int); int cal (void *);