ppc: Optimize quant functions