diff options
| author | Hal Finkel <hfinkel@anl.gov> | 2017-09-06 03:08:26 +0000 |
|---|---|---|
| committer | Hal Finkel <hfinkel@anl.gov> | 2017-09-06 03:08:26 +0000 |
| commit | 112a6bac726658c7ebd73a4aaf2539fa67ffb9e4 (patch) | |
| tree | 855d18be5b2d80412a673361edfed23adcf10868 /llvm/lib/Target/PowerPC | |
| parent | a69a3a3f6279f6deae7db595292c5f3f9d46add4 (diff) | |
| download | bcm5719-llvm-112a6bac726658c7ebd73a4aaf2539fa67ffb9e4.tar.gz bcm5719-llvm-112a6bac726658c7ebd73a4aaf2539fa67ffb9e4.zip | |
[PowerPC] Don't use xscvdpspn on the P7
xscvdpspn was not introduced until the P8, so don't use it on the P7. Fixes a
regression introduced in r288152.
llvm-svn: 312612
Diffstat (limited to 'llvm/lib/Target/PowerPC')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCISelLowering.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp index 74dedafed5b..6295693ffff 100644 --- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -7463,9 +7463,11 @@ static SDValue BuildVSLDOI(SDValue LHS, SDValue RHS, unsigned Amt, EVT VT, /// - 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; @@ -7627,7 +7629,8 @@ SDValue PPCTargetLowering::LowerBUILD_VECTOR(SDValue Op, // 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(); } |

