I think the cost would be something like:
+    case POPCOUNT:
+      *total = COSTS_N_INSNS (3);
+      return false;

Segher> Is that the cost when using popcountb?  It is a lot more
Segher> expensive when that instruction isn't available (like on
Segher> most current machines).

        Yes, but do we even create POPCOUNT rtx if the insn isn't
supported?  Wouldn't we expand or create libcall early?

I don't know, there's only one way to find out... :-)


Segher

Reply via email to