1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

[X86] Fold some variable declarations and initializations into if statements. NFC

llvm-svn: 256451
This commit is contained in:
Craig Topper 2015-12-26 19:48:37 +00:00
parent f19aafee12
commit 89319531b9

View File

@ -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;