diff -ur root-6.12.04.orig/interpreter/llvm/src/lib/Target/PowerPC/PPCISelLowering.cpp root-6.12.04/interpreter/llvm/src/lib/Target/PowerPC/PPCISelLowering.cpp
--- root-6.12.04.orig/interpreter/llvm/src/lib/Target/PowerPC/PPCISelLowering.cpp 2017-12-13 08:27:42.000000000 +0100
+++ root-6.12.04/interpreter/llvm/src/lib/Target/PowerPC/PPCISelLowering.cpp 2018-01-11 12:40:14.956914822 +0100
@@ -7448,9 +7448,11 @@
/// - The node is a "load-and-splat"
/// In all other cases, we will choose to keep the BUILD_VECTOR.
static bool haveEfficientBuildVectorPattern(BuildVectorSDNode *V,
- bool HasDirectMove) {
+ bool HasDirectMove,
+ bool HasP8Vector) {
EVT VecVT = V->getValueType(0);
- bool RightType = VecVT == MVT::v2f64 || VecVT == MVT::v4f32 ||
+ bool RightType = VecVT == MVT::v2f64 ||
+ (HasP8Vector && VecVT == MVT::v4f32) ||
(HasDirectMove && (VecVT == MVT::v2i64 || VecVT == MVT::v4i32));
if (!RightType)
return false;
@@ -7612,7 +7614,8 @@
// lowered to VSX instructions under certain conditions.
// Without VSX, there is no pattern more efficient than expanding the node.
if (Subtarget.hasVSX() &&
- haveEfficientBuildVectorPattern(BVN, Subtarget.hasDirectMove()))
+ haveEfficientBuildVectorPattern(BVN, Subtarget.hasDirectMove(),
+ Subtarget.hasP8Vector()))
return Op;
return SDValue();
}