forked from OSchip/llvm-project
[X86][SSE] combineBitcastvxi1 - add support for bitcasting to non-scalar integers
Truncate the movmsk scalar integer result to the equivalent scalar integer width as before but then bitcast to the requested type. We still have the issue identified in PR41594 but D61114 should handle this. llvm-svn: 359176
This commit is contained in:
parent
d144572dac
commit
0a7d1b3ce1
|
@ -33735,8 +33735,7 @@ static SDValue combineBitcastvxi1(SelectionDAG &DAG, EVT VT, SDValue Src,
|
|||
const SDLoc &DL,
|
||||
const X86Subtarget &Subtarget) {
|
||||
EVT SrcVT = Src.getValueType();
|
||||
|
||||
if (!VT.isScalarInteger() || !SrcVT.isSimple())
|
||||
if (!SrcVT.isSimple() || SrcVT.getScalarType() != MVT::i1)
|
||||
return SDValue();
|
||||
|
||||
// If the input is a truncate from v16i8 or v32i8 go ahead and use a
|
||||
|
@ -33832,7 +33831,11 @@ static SDValue combineBitcastvxi1(SelectionDAG &DAG, EVT VT, SDValue Src,
|
|||
DAG.getUNDEF(MVT::v8i16));
|
||||
V = DAG.getNode(X86ISD::MOVMSK, DL, MVT::i32, V);
|
||||
}
|
||||
return DAG.getZExtOrTrunc(V, DL, VT);
|
||||
|
||||
EVT IntVT =
|
||||
EVT::getIntegerVT(*DAG.getContext(), SrcVT.getVectorNumElements());
|
||||
V = DAG.getZExtOrTrunc(V, DL, IntVT);
|
||||
return DAG.getBitcast(VT, V);
|
||||
}
|
||||
|
||||
// Convert a vXi1 constant build vector to the same width scalar integer.
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue