[llvm-commits] [PATCH] ARM/NEON: Custom lower ctpop for appropriate vector types

Anton Korobeynikov anton at korobeynikov.info
Thu Nov 29 21:53:29 PST 2012


Pete,

> The population count intrinsic (ctpop) is supported on ARM/NEON for v8i8 and
> v16i8 types via NEON's vcnt instruction.
> This patch leverages vcnt and other NEON instructions to custom lower ctpop
> for v2i32/v4i32 and v4i16/v8i16 types.
> As you'll see, a fair chunk of this patch is comments describing the
> lowering, which I am happy to adjust to people's liking.
> Please review!
> Thanks!
Can't you use Pat<> magic in .td file to expand ctpop into series of
nodes? It seems exactly what's your lowering does...

--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University



More information about the llvm-commits mailing list