https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126351

--- Comment #5 from Drea Pinski <pinskia at gcc dot gnu.org> ---
(In reply to ktkachov from comment #4)
> (In reply to Drea Pinski from comment #3)
> > Coremarks is a bad benchmark.
> 
> Sure, but in this case it acts as a microbenchmarking harness for the two
> sequences.
> 
> If CRC calculation is actually important for performance in an application
> then it's likely called multiple times, which would put the table in the
> cache. The PMULL sequence is more instructions overall, uses SIMD (which
> usually has higher latency and lower throughput than simple scalar ops) and
> contains 4xGP<->FP moves so can't possibly win against a cache-hitting load.

Except if it is in a loop, there will only be 2 GP->FP and most likely the
other one is outside of the loop. Even the others might not happen because they
kept in the simd registers until after the loop and the one for user data might
be a load.

> 
> Note this applies only for QImode crc. For larger sizes I think we should
> still prefer the PMULL sequence

So it depends on what the CRC is used for. If it is with memory locations,
using the PMULL Is faster ...

Again coremarks is a bad microbenchmark for the above reasons.

Reply via email to