Re: [PATCH] x86: Improve expansion of __builtin_parity

2020-06-07 Thread Uros Bizjak via Gcc-patches
Hello Roger and nice to hear from you after a loong time! > Alas there is a mismatch between RTL's definition of PARITY operation > which has an integer mode result, and the x86's parity flag. So when > Uros addressed PR target/44481 in 2010, by introducing UNSPEC PARITY, > we lost some of the op

[PATCH] x86: Improve expansion of __builtin_parity

2020-06-06 Thread Roger Sayle
This patch changes the way that __builtin_parity is expanded in i386.md. This changes the code generated for the function: int test(unsigned char a) { unsigned char x = a + 1; return __builtin_parity(x); } from this before the patch: test: addl$1, %edi movzb