forked from OSchip/llvm-project
[DAG] DAGCombiner::XformToShuffleWithZero - use APInt::extractBits helper. NFCI.
This commit is contained in:
parent
89b1184325
commit
6fa6000e3e
|
@ -19786,14 +19786,10 @@ SDValue DAGCombiner::XformToShuffleWithZero(SDNode *N) {
|
|||
return SDValue();
|
||||
|
||||
// Extract the sub element from the constant bit mask.
|
||||
if (DAG.getDataLayout().isBigEndian()) {
|
||||
Bits.lshrInPlace((Split - SubIdx - 1) * NumSubBits);
|
||||
} else {
|
||||
Bits.lshrInPlace(SubIdx * NumSubBits);
|
||||
}
|
||||
|
||||
if (Split > 1)
|
||||
Bits = Bits.trunc(NumSubBits);
|
||||
if (DAG.getDataLayout().isBigEndian())
|
||||
Bits = Bits.extractBits(NumSubBits, (Split - SubIdx - 1) * NumSubBits);
|
||||
else
|
||||
Bits = Bits.extractBits(NumSubBits, SubIdx * NumSubBits);
|
||||
|
||||
if (Bits.isAllOnesValue())
|
||||
Indices.push_back(i);
|
||||
|
|
Loading…
Reference in New Issue