On Tue, Feb 23, 2016 at 11:39 AM, Dmytro Sheyko wrote:
> Hello,
>
> I am compiling code like this:
>
> int test(int x, int eq, int lt, int gt) {
> return x < 2000 ? lt : x > 2000 ? gt : eq;
> }
>
> and expect that compiler would generate one CMP instruction for both
> comparisons:
Hello,
I am compiling code like this:
int test(int x, int eq, int lt, int gt) {
return x < 2000 ? lt : x > 2000 ? gt : eq;
}
and expect that compiler would generate one CMP instruction for both
comparisons:
cmpl$2000, %edi
jl .L37
jne .L38