Clang generates worse code for 7 comparisons than for 8 comparisons
问题 I was intrigued by clang's ability to convert many == comparisons of small integers to to one big SIMD instruction, but then I noticed something strange. Clang generated "worse" code(in my amateur evaluation) when I had 7 comparisons compared to the code when I had 8 comparisons. bool f1(short x){ return (x==-1) | (x == 150) | (x==5) | (x==64) | (x==15) | (x==223) | (x==42) | (x==47); } bool f2(short x){ return (x==-1) | (x == 150) | (x==5) | (x==64) | (x==15) | (x==223) | (x==42); } My