This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: Simplify rules for ctz/clz patterns and RTL


I think the cost would be something like:

+    case POPCOUNT:
+      *total = COSTS_N_INSNS (3);
+      return false;

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

The rest (i.e. CLZ, CTZ) looks good to me.


Segher



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]