@@ -610,7 +610,7 @@ bool Emu64Ops::populatePHIs(Function& F) {
610
610
for (auto BI = BB.begin (); (PN = dyn_cast<PHINode>(BI)) != nullptr ; ++BI) {
611
611
if (!isInt64 (PN))
612
612
continue ;
613
- Value* L, * H;
613
+ Value* L = nullptr , * H = nullptr ;
614
614
std::tie (L, H) = getExpandedValues (PN);
615
615
616
616
PHINode* Lo = cast<PHINode>(L);
@@ -688,9 +688,9 @@ bool InstExpander::visitSub(BinaryOperator& BinOp) {
688
688
if (!Emu->isInt64 (&BinOp))
689
689
return false ;
690
690
691
- Value* L0, * H0;
691
+ Value* L0 = nullptr , * H0 = nullptr ;
692
692
std::tie (L0, H0) = Emu->getExpandedValues (BinOp.getOperand (0 ));
693
- Value* L1, * H1;
693
+ Value* L1 = nullptr , * H1 = nullptr ;
694
694
std::tie (L1, H1) = Emu->getExpandedValues (BinOp.getOperand (1 ));
695
695
696
696
GenISAIntrinsic::ID GIID = GenISAIntrinsic::GenISA_sub_pair;
@@ -707,9 +707,9 @@ bool InstExpander::visitMul(BinaryOperator& BinOp) {
707
707
if (!Emu->isInt64 (&BinOp))
708
708
return false ;
709
709
710
- Value* L0, * H0;
710
+ Value* L0 = nullptr , * H0 = nullptr ;
711
711
std::tie (L0, H0) = Emu->getExpandedValues (BinOp.getOperand (0 ));
712
- Value* L1, * H1;
712
+ Value* L1 = nullptr , * H1 = nullptr ;
713
713
std::tie (L1, H1) = Emu->getExpandedValues (BinOp.getOperand (1 ));
714
714
715
715
GenISAIntrinsic::ID GIID = GenISAIntrinsic::GenISA_mul_pair;
@@ -871,9 +871,9 @@ bool InstExpander::visitLShr(BinaryOperator& BinOp) {
871
871
if (!Emu->isInt64 (&BinOp))
872
872
return false ;
873
873
874
- Value* Lo, * Hi;
874
+ Value* Lo = nullptr , * Hi = nullptr ;
875
875
std::tie (Lo, Hi) = Emu->getExpandedValues (BinOp.getOperand (0 ));
876
- Value* ShAmt;
876
+ Value* ShAmt = nullptr ;
877
877
std::tie (ShAmt, std::ignore) = Emu->getExpandedValues (BinOp.getOperand (1 ));
878
878
879
879
BasicBlock* OldBB = BinOp.getParent ();
@@ -1121,9 +1121,9 @@ bool InstExpander::visitOr(BinaryOperator& BinOp) {
1121
1121
if (!Emu->isInt64 (&BinOp))
1122
1122
return false ;
1123
1123
1124
- Value* L0, * H0;
1124
+ Value* L0 = nullptr , * H0 = nullptr ;
1125
1125
std::tie (L0, H0) = Emu->getExpandedValues (BinOp.getOperand (0 ));
1126
- Value* L1, * H1;
1126
+ Value* L1 = nullptr , * H1 = nullptr ;
1127
1127
std::tie (L1, H1) = Emu->getExpandedValues (BinOp.getOperand (1 ));
1128
1128
1129
1129
Value* Lo = IRB->CreateOr (L0, L1);
@@ -1137,9 +1137,9 @@ bool InstExpander::visitXor(BinaryOperator& BinOp) {
1137
1137
if (!Emu->isInt64 (&BinOp))
1138
1138
return false ;
1139
1139
1140
- Value* L0, * H0;
1140
+ Value* L0 = nullptr , * H0 = nullptr ;
1141
1141
std::tie (L0, H0) = Emu->getExpandedValues (BinOp.getOperand (0 ));
1142
- Value* L1, * H1;
1142
+ Value* L1 = nullptr , * H1 = nullptr ;
1143
1143
std::tie (L1, H1) = Emu->getExpandedValues (BinOp.getOperand (1 ));
1144
1144
1145
1145
Value* Lo = IRB->CreateXor (L0, L1);
@@ -1174,7 +1174,7 @@ bool InstExpander::visitStore(StoreInst& ST) {
1174
1174
if (!Emu->isInt64 (V))
1175
1175
return false ;
1176
1176
1177
- Value* Lo, * Hi;
1177
+ Value* Lo = nullptr , * Hi = nullptr ;
1178
1178
std::tie (Lo, Hi) = Emu->getExpandedValues (V);
1179
1179
1180
1180
Type* V2I32Ty = Emu->getV2Int32Ty ();
@@ -1539,7 +1539,7 @@ bool InstExpander::visitSIToFP(SIToFPInst& S2F) {
1539
1539
if (!Emu->isInt64 (Src))
1540
1540
return false ;
1541
1541
1542
- Value* Lo, * Hi;
1542
+ Value* Lo = nullptr , * Hi = nullptr ;
1543
1543
std::tie (Lo, Hi) = Emu->getExpandedValues (Src);
1544
1544
1545
1545
Type* DstTy = S2F.getType ();
@@ -1615,7 +1615,7 @@ bool InstExpander::visitIntToPtr(IntToPtrInst& I2P) {
1615
1615
if (!Emu->isInt64 (Src))
1616
1616
return false ;
1617
1617
1618
- Value* Lo, * Hi;
1618
+ Value* Lo = nullptr , * Hi = nullptr ;
1619
1619
std::tie (Lo, Hi) = Emu->getExpandedValues (Src);
1620
1620
1621
1621
GenISAIntrinsic::ID GIID = GenISAIntrinsic::GenISA_pair_to_ptr;
@@ -1647,7 +1647,7 @@ bool InstExpander::visitBitCast(BitCastInst& BC) {
1647
1647
if (Emu->isArg64Cast (&BC))
1648
1648
return false ;
1649
1649
1650
- Value* Lo, * Hi;
1650
+ Value* Lo = nullptr , * Hi = nullptr ;
1651
1651
std::tie (Lo, Hi) = Emu->getExpandedValues (Src);
1652
1652
1653
1653
Type* V2I32Ty = Emu->getV2Int32Ty ();
@@ -1665,12 +1665,12 @@ bool InstExpander::visitICmp(ICmpInst& Cmp) {
1665
1665
return false ;
1666
1666
1667
1667
auto Pred = Cmp.getPredicate ();
1668
- Value* L0, * H0;
1668
+ Value* L0 = nullptr , * H0 = nullptr ;
1669
1669
std::tie (L0, H0) = Emu->getExpandedValues (Cmp.getOperand (0 ));
1670
- Value* L1, * H1;
1670
+ Value* L1 = nullptr , * H1 = nullptr ;
1671
1671
std::tie (L1, H1) = Emu->getExpandedValues (Cmp.getOperand (1 ));
1672
1672
1673
- Value* T0, * T1, * T2, * T3, * Res = nullptr ;
1673
+ Value* T0 = nullptr , * T1 = nullptr , * T2 = nullptr , * T3 = nullptr , * Res = nullptr ;
1674
1674
switch (Pred) {
1675
1675
default :
1676
1676
llvm_unreachable (" Invalid ICmp predicate" );
@@ -1751,7 +1751,7 @@ bool InstExpander::visitICmp(ICmpInst& Cmp) {
1751
1751
bool InstExpander::visitPHI (PHINode& PN) {
1752
1752
if (!Emu->isInt64 (&PN))
1753
1753
return false ;
1754
- Value* Lo, * Hi;
1754
+ Value* Lo = nullptr , * Hi = nullptr ;
1755
1755
std::tie (Lo, Hi) = Emu->getExpandedValues (&PN);
1756
1756
assert (Lo != nullptr && Hi != nullptr );
1757
1757
return false ;
@@ -1764,7 +1764,7 @@ bool InstExpander::visitCall(CallInst& Call) {
1764
1764
auto Combine2xi32Toi64 = [this ](Value* val)->Value *
1765
1765
{
1766
1766
assert (Emu->isInt64 (val));
1767
- Value* InputLo, * InputHi;
1767
+ Value* InputLo = nullptr , * InputHi = nullptr ;
1768
1768
std::tie (InputLo, InputHi) = Emu->getExpandedValues (val);
1769
1769
Type* V2I32Ty = Emu->getV2Int32Ty ();
1770
1770
Value* NewVal = UndefValue::get (V2I32Ty);
@@ -1825,7 +1825,7 @@ bool InstExpander::visitCall(CallInst& Call) {
1825
1825
auto * GenCopy = Call.clone ();
1826
1826
GenCopy->insertBefore (&Call);
1827
1827
IRB->SetInsertPoint (&Call);
1828
- Value* Lo, * Hi;
1828
+ Value* Lo = nullptr , * Hi = nullptr ;
1829
1829
Spliti64To2xi32 (GenCopy, Lo, Hi);
1830
1830
Call.replaceAllUsesWith (GenCopy);
1831
1831
Emu->setExpandedValues (GenCopy, Lo, Hi);
@@ -1849,7 +1849,7 @@ bool InstExpander::visitCall(CallInst& Call) {
1849
1849
opNum++;
1850
1850
}
1851
1851
IRB->SetInsertPoint (&Call);
1852
- Value* Lo, * Hi;
1852
+ Value* Lo = nullptr , * Hi = nullptr ;
1853
1853
Spliti64To2xi32 (GenCopy, Lo, Hi);
1854
1854
Call.replaceAllUsesWith (GenCopy);
1855
1855
Emu->setExpandedValues (GenCopy, Lo, Hi);
@@ -1927,7 +1927,7 @@ bool InstExpander::visitCall(CallInst& Call) {
1927
1927
if (Emu->isInt64 (&Call))
1928
1928
{
1929
1929
IRB->SetInsertPoint (&Call);
1930
- Value* OutputLo, * OutputHi;
1930
+ Value* OutputLo = nullptr , * OutputHi = nullptr ;
1931
1931
Spliti64To2xi32 (CallCopy, OutputLo, OutputHi);
1932
1932
Emu->setExpandedValues (CallCopy, OutputLo, OutputHi);
1933
1933
}
@@ -1968,7 +1968,7 @@ bool InstExpander::visitVAArg(VAArgInst& VAAI) {
1968
1968
bool InstExpander::visitExtractElement (ExtractElementInst& EEI) {
1969
1969
// Fix index operand if necessary.
1970
1970
if (Emu->isInt64 (EEI.getIndexOperand ())) {
1971
- Value* L;
1971
+ Value* L = nullptr ;
1972
1972
std::tie (L, std::ignore) = Emu->getExpandedValues (EEI.getIndexOperand ());
1973
1973
EEI.setOperand (1 , L);
1974
1974
}
@@ -1998,7 +1998,7 @@ bool InstExpander::visitExtractElement(ExtractElementInst& EEI) {
1998
1998
bool InstExpander::visitInsertElement (InsertElementInst& IEI) {
1999
1999
// Fix index operand if necessary.
2000
2000
if (Emu->isInt64 (IEI.getOperand (2 ))) {
2001
- Value* L;
2001
+ Value* L = nullptr ;
2002
2002
std::tie (L, std::ignore) = Emu->getExpandedValues (IEI.getOperand (2 ));
2003
2003
IEI.setOperand (2 , L);
2004
2004
}
@@ -2011,7 +2011,7 @@ bool InstExpander::visitInsertElement(InsertElementInst& IEI) {
2011
2011
// NOTE: This is NOT the efficient way to handle that and needs revising
2012
2012
// later.
2013
2013
2014
- Value* Lo, * Hi;
2014
+ Value* Lo = nullptr , * Hi = nullptr ;
2015
2015
std::tie (Lo, Hi) = Emu->getExpandedValues (V);
2016
2016
2017
2017
// Create the emulated vector.
0 commit comments