On Thu, 11 Oct 2018, Martin Liška wrote:

> Hi.
> 
> As seen in the PR, switch conversion can do better when we return equal 
> numbers
> based on index value. I implemented more than that, more precisely I support 
> all linear
> transformation based on index value. It's the same what clang is capable of.
> 
> Patch survives testing on x86_64-linux-gnu. I added various tests that should
> benefit of the transformation.

Nice!  I'd like to point out that __attribute__((noipa)) might be more
appropriate for the new tests, instead of the "noinline,noclone" combo.

(I was also wondering about overflow behavior that Jakub asked about)

Alexander

Reply via email to