Hi, On Thu, Jan 09 2020, Christophe Lyon wrote: > On Tue, 7 Jan 2020 at 14:18, Martin Jambor <mjam...@suse.cz> wrote: >> >> Hi, >> >> On Fri, Jan 03 2020, Feng Xue OS wrote: >> > When checking a self-recursively generated value for aggregate jump >> > function, wrong aggregate lattice was used, which will cause infinite >> > constant propagation. This patch is composed to fix this issue. >> > >> > 2020-01-03 Feng Xue <f...@os.amperecomputing.com> >> > >> > PR ipa/93084 >> > * ipa-cp.c (self_recursively_generated_p): Find matched aggregate >> > lattice for a value to check. >> > (propagate_vals_across_arith_jfunc): Add an assertion to ensure >> > finite propagation in self-recursive scc. >> >> as far as I am concerned, the patch looks good. > > Hi, > The new test introduced by this patch (gcc.dg/ipa/ipa-clone-3.c) fails > on arm, powerpc and mips according to gcc-testresults. > FAIL: gcc.dg/ipa/ipa-clone-3.c scan-ipa-dump-times cp "Creating a > specialized node of recur_fn/[0-9]*\\." 8 > > Can you have a look? >
thank you, next time please also consider filing a bug with the exact architecture triplets/quadruplets where it fails. I started with a look at aarch64-suse-linux and then at ppc64le-redhat-linux but apparently those were not the arms and powerpcs I was looking for. After building a cross-compiler for armv8l-unknown-linux-gnueabihf I can see the failure, aggregate jump functions do not get built for: main () { struct V v; <bb 2> [local count: 1073741824]: v = *.LC0; _4 = recur_fn (&v); return _4; } which is how the release_ssa dump looks like for this target, even though it might actually be simpler than for the supported and more common form: main () { struct V v; <bb 2> [local count: 1073741824]: v.f0 = 1; v.f1 = 3; _5 = recur_fn (&v); return _5; } The different form stems from the fact that can_move_by_pieces returns false in gimplify_init_constructor. I'll put this on my TODO list. Meanwhile, I' about to commit this which should fix the testcase for now after lightly testing it with make -k check-gcc RUNTESTFLAGS="ipa.exp". Thanks, Martin 2020-01-10 Martin Jambor <mjam...@suse.cz> * gcc.dg/ipa/ipa-clone-3.c: Replace struct initializer with piecemeal initialization. --- gcc/testsuite/gcc.dg/ipa/ipa-clone-3.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-clone-3.c b/gcc/testsuite/gcc.dg/ipa/ipa-clone-3.c index 18d29bdd0b3..a73cb8b63fc 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-clone-3.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-clone-3.c @@ -34,8 +34,10 @@ int recur_fn (struct V * __restrict v) int main () { - struct V v = {1, 3}; + struct V v; + v.f0 = 1; + v.f1 = 3; return recur_fn (&v); } -- 2.24.1