Index: lib/Target/PowerPC/PPCTargetTransformInfo.cpp =================================================================== --- lib/Target/PowerPC/PPCTargetTransformInfo.cpp +++ lib/Target/PowerPC/PPCTargetTransformInfo.cpp @@ -226,6 +226,11 @@ if (Directive == PPC::DIR_E500mc || Directive == PPC::DIR_E5500) return 1; + // For the P8, VSU instructions have a 6-cycle latency and there are two VSU + // units, so unroll by 12x for latency hiding. + if (Directive == PPC::DIR_PWR8) + return 12; + // For most things, modern systems have two execution units (and // out-of-order execution). return 2;