mirror of
https://github.com/RPCS3/llvm.git
synced 2025-03-01 07:09:02 +00:00
[X86] Fold some variable declarations and initializations into if statements. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256451 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1c6a388c07
commit
4e87da88e6
@ -4922,8 +4922,7 @@ static bool getTargetShuffleMask(SDNode *N, MVT VT,
|
||||
if (MaskNode->getOpcode() == X86ISD::VBROADCAST) {
|
||||
unsigned NumEltsInMask = MaskNode->getNumOperands();
|
||||
MaskNode = MaskNode->getOperand(0);
|
||||
auto *CN = dyn_cast<ConstantSDNode>(MaskNode);
|
||||
if (CN) {
|
||||
if (auto *CN = dyn_cast<ConstantSDNode>(MaskNode)) {
|
||||
APInt MaskEltValue = CN->getAPIntValue();
|
||||
for (unsigned i = 0; i < NumEltsInMask; ++i)
|
||||
RawMask.push_back(MaskEltValue.getLoBits(MaskLoBits).getZExtValue());
|
||||
@ -4946,8 +4945,7 @@ static bool getTargetShuffleMask(SDNode *N, MVT VT,
|
||||
if (!MaskCP || MaskCP->isMachineConstantPoolEntry())
|
||||
return false;
|
||||
|
||||
auto *C = dyn_cast<Constant>(MaskCP->getConstVal());
|
||||
if (C) {
|
||||
if (auto *C = dyn_cast<Constant>(MaskCP->getConstVal())) {
|
||||
DecodeVPERMVMask(C, VT, Mask);
|
||||
if (Mask.empty())
|
||||
return false;
|
||||
@ -4999,8 +4997,7 @@ static bool getTargetShuffleMask(SDNode *N, MVT VT,
|
||||
if (!MaskCP || MaskCP->isMachineConstantPoolEntry())
|
||||
return false;
|
||||
|
||||
auto *C = dyn_cast<Constant>(MaskCP->getConstVal());
|
||||
if (C) {
|
||||
if (auto *C = dyn_cast<Constant>(MaskCP->getConstVal())) {
|
||||
DecodeVPERMV3Mask(C, VT, Mask);
|
||||
if (Mask.empty())
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user