--- Comment #4 from rth at gcc dot gnu dot org 2009-12-08 00:55 ---
4.5 regression fixed in pr42269.
I don't know that we'll ever be able to fix the original PR.
The problem is that we need to work backward from the "x &= 0xf"
through the xor, and see that the srl doesn't actually use
--- Comment #3 from rth at gcc dot gnu dot org 2009-12-03 00:32 ---
Gcc 4.5 has regressed this even further:
extwl $16,2,$1
xor $1,$16,$16
addl $31,$16,$16 << signextend
zapnot $16,15,$1 << zeroextend of signextend
srl $1,8,$1
Neither extensi
--
rguenth at gcc dot gnu dot org changed:
What|Removed |Added
Severity|normal |enhancement
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27469
--- Comment #2 from mattst88 at gmail dot com 2009-04-18 15:25 ---
(In reply to comment #0)
> unsigned parity(unsigned x) {
> x ^= x >> 16;
> x ^= x >> 8;
> x ^= x >> 4;
> x &= 0xf;
> return (0x6996 >> x) & 1;
> }
>
> gcc 4.2.0 20060506 produces:
> extwl a0
--- Comment #1 from pinskia at gcc dot gnu dot org 2006-05-07 18:59 ---
Confirmed.
It does try to do it:
(insn 18 16 19 2 (set (reg:DI 79 [ x.25 ])
(zero_extend:DI (subreg/s:SI (reg/v:DI 71 [ x.25 ]) 0))) 52
{zero_extendsidi2} (insn_list:REG_DEP_TRUE 16 (nil))
(nil))
into;
(