mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-18 17:55:18 +00:00
A splat of a vector constant of all zero or all one is the vector constant.
llvm-svn: 29234
This commit is contained in:
parent
a634c2b838
commit
56434b7578
@ -2393,6 +2393,8 @@ X86TargetLowering::LowerVECTOR_SHUFFLE(SDOperand Op, SelectionDAG &DAG) {
|
||||
bool V2IsUndef = V2.getOpcode() == ISD::UNDEF;
|
||||
|
||||
if (isSplatMask(PermMask.Val)) {
|
||||
if (ISD::isBuildVectorAllZeros(V1.Val) || ISD::isBuildVectorAllOnes(V1.Val))
|
||||
return V1;
|
||||
if (NumElems <= 4) return Op;
|
||||
// Promote it to a v4i32 splat.
|
||||
return PromoteSplat(Op, DAG);
|
||||
|
Loading…
x
Reference in New Issue
Block a user