https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63259

--- Comment #11 from Oleg Endo <olegendo at gcc dot gnu.org> ---
(In reply to thopre01 from comment #10)
> 
> I have the same gimple and for me the bswap is correctly detected. Can you
> break at find_bswap_or_nop just after calling find_bswap_or_nop_1 on the if
> (!source_stmt) and show me the output of p/x n->n ?

n->n = 0x0000000000000102  limit = 4

For both, test_099 and test_08.

> Indeed, my mistake. Ok I tested a bit and found that the problem is the
> depth at which it's looking. Try to recompile tree-ssa-math-opts.c after
> increasing the limit number in find_bswap_or_nop. Right now the limit will
> evaluate to 4 and the gimple I have has a depth of 5.

I've tried ...

  limit += 10 + (int) ceil_log2 ((unsigned HOST_WIDE_INT) limit);

... but it doesn't change anything here.

Reply via email to