mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
[X86][AVX] Rename LowerVectorBroadcast to lowerBuildVectorAsBroadcast. NFCI.
Since the shuffle refactor, this is only used during BUILD_VECTOR lowering. llvm-svn: 301834
This commit is contained in:
parent
d5c295b069
commit
42d3b719f4
@ -6646,18 +6646,16 @@ static bool isUseOfShuffle(SDNode *N) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Attempt to use the vbroadcast instruction to generate a splat value for the
|
/// Attempt to use the vbroadcast instruction to generate a splat value
|
||||||
/// following cases:
|
/// from a splat BUILD_VECTOR which uses:
|
||||||
/// 1. A splat BUILD_VECTOR which uses:
|
/// a. A single scalar load, or a constant.
|
||||||
/// a. A single scalar load, or a constant.
|
/// b. Repeated pattern of constants (e.g. <0,1,0,1> or <0,1,2,3,0,1,2,3>).
|
||||||
/// b. Repeated pattern of constants (e.g. <0,1,0,1> or <0,1,2,3,0,1,2,3>).
|
|
||||||
/// 2. A splat shuffle which uses a scalar_to_vector node which comes from
|
|
||||||
/// a scalar load, or a constant.
|
|
||||||
///
|
///
|
||||||
/// The VBROADCAST node is returned when a pattern is found,
|
/// The VBROADCAST node is returned when a pattern is found,
|
||||||
/// or SDValue() otherwise.
|
/// or SDValue() otherwise.
|
||||||
static SDValue LowerVectorBroadcast(BuildVectorSDNode *BVOp, const X86Subtarget &Subtarget,
|
static SDValue lowerBuildVectorAsBroadcast(BuildVectorSDNode *BVOp,
|
||||||
SelectionDAG &DAG) {
|
const X86Subtarget &Subtarget,
|
||||||
|
SelectionDAG &DAG) {
|
||||||
// VBROADCAST requires AVX.
|
// VBROADCAST requires AVX.
|
||||||
// TODO: Splats could be generated for non-AVX CPUs using SSE
|
// TODO: Splats could be generated for non-AVX CPUs using SSE
|
||||||
// instructions, but there's less potential gain for only 128-bit vectors.
|
// instructions, but there's less potential gain for only 128-bit vectors.
|
||||||
@ -7610,7 +7608,7 @@ X86TargetLowering::LowerBUILD_VECTOR(SDValue Op, SelectionDAG &DAG) const {
|
|||||||
return AddSub;
|
return AddSub;
|
||||||
if (SDValue HorizontalOp = LowerToHorizontalOp(BV, Subtarget, DAG))
|
if (SDValue HorizontalOp = LowerToHorizontalOp(BV, Subtarget, DAG))
|
||||||
return HorizontalOp;
|
return HorizontalOp;
|
||||||
if (SDValue Broadcast = LowerVectorBroadcast(BV, Subtarget, DAG))
|
if (SDValue Broadcast = lowerBuildVectorAsBroadcast(BV, Subtarget, DAG))
|
||||||
return Broadcast;
|
return Broadcast;
|
||||||
if (SDValue BitOp = lowerBuildVectorToBitOp(BV, DAG))
|
if (SDValue BitOp = lowerBuildVectorToBitOp(BV, DAG))
|
||||||
return BitOp;
|
return BitOp;
|
||||||
@ -9848,7 +9846,6 @@ static SDValue lowerVectorShuffleAsTruncBroadcast(const SDLoc &DL, MVT VT,
|
|||||||
/// For convenience, this code also bundles all of the subtarget feature set
|
/// For convenience, this code also bundles all of the subtarget feature set
|
||||||
/// filtering. While a little annoying to re-dispatch on type here, there isn't
|
/// filtering. While a little annoying to re-dispatch on type here, there isn't
|
||||||
/// a convenient way to factor it out.
|
/// a convenient way to factor it out.
|
||||||
/// FIXME: This is very similar to LowerVectorBroadcast - can we merge them?
|
|
||||||
static SDValue lowerVectorShuffleAsBroadcast(const SDLoc &DL, MVT VT,
|
static SDValue lowerVectorShuffleAsBroadcast(const SDLoc &DL, MVT VT,
|
||||||
SDValue V1, SDValue V2,
|
SDValue V1, SDValue V2,
|
||||||
ArrayRef<int> Mask,
|
ArrayRef<int> Mask,
|
||||||
|
Loading…
Reference in New Issue
Block a user