[Bug target/62011] False Data Dependency in popcnt instruction

2014-08-05 Thread debiandev at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62011

--- Comment #3 from Andev debiandev at gmail dot com ---
This seems to be specific to some latest Intel CPUs. I am not sure which other
CPUs are affected. There is no official errata for this behavior AFAIK. 

As Alexander suggested, it would be a great idea to have a work around for this
in gcc for these specific CPUs.


[Bug rtl-optimization/62011] New: False Data Dependency in popcnt instruction

2014-08-04 Thread debiandev at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62011

Bug ID: 62011
   Summary: False Data Dependency in popcnt instruction
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: debiandev at gmail dot com

On Sandy/Ivy Bridge and Haswell processors, the instruction:

popcnt src, dest

appears to have a false dependency on the destination register dest. Even
though the instruction only writes to it, the instruction will wait until dest
is ready before executing.

This causes a loss in performance as explained here:
http://stackoverflow.com/questions/25078285/replacing-a-32-bit-loop-count-variable-with-64-bit-introduces-crazy-performance