@@ -840,9 +840,9 @@ bool InstExpander::visitShl(BinaryOperator &BinOp) {
840840 // uniform one in most cases.
841841 Value *NE = IRB->CreateICmpNE (ShAmt, Constant::getNullValue (ShAmt->getType ()));
842842 BasicBlock *JointBB = OldBB->splitBasicBlock (&BinOp);
843- ResLo = PHINode::Create (IRB->getInt32Ty (), 2 , " .shl.outer.merge.lo" , &BinOp);
843+ ResLo = PHINode::Create (IRB->getInt32Ty (), 2 , " .shl.outer.merge.lo" , IGCLLVM::insertPosition ( &BinOp) );
844844 cast<Instruction>(ResLo)->setDebugLoc (BinOpDebugLoc);
845- ResHi = PHINode::Create (IRB->getInt32Ty (), 2 , " .shl.outer.merge.hi" , &BinOp);
845+ ResHi = PHINode::Create (IRB->getInt32Ty (), 2 , " .shl.outer.merge.hi" , IGCLLVM::insertPosition ( &BinOp) );
846846 cast<Instruction>(ResHi)->setDebugLoc (BinOpDebugLoc);
847847
848848 BasicBlock *TrueBB = BasicBlock::Create (*Emu->getContext (), " .shl.outer.true.branch" );
@@ -861,9 +861,9 @@ bool InstExpander::visitShl(BinaryOperator &BinOp) {
861861 // Prepare to generate branches to handle the case where `ShAmt` is less
862862 // than 32 (true branch) or otherwise (false branch).
863863 BasicBlock *InnerJBB = TrueBB->splitBasicBlock (TrueJmp);
864- InnerResLo = PHINode::Create (IRB->getInt32Ty (), 2 , " .shl.merge.inner.lo" , TrueJmp);
864+ InnerResLo = PHINode::Create (IRB->getInt32Ty (), 2 , " .shl.merge.inner.lo" , IGCLLVM::insertPosition ( TrueJmp) );
865865 InnerResLo->setDebugLoc (BinOpDebugLoc);
866- InnerResHi = PHINode::Create (IRB->getInt32Ty (), 2 , " .shl.merge.inner.hi" , TrueJmp);
866+ InnerResHi = PHINode::Create (IRB->getInt32Ty (), 2 , " .shl.merge.inner.hi" , IGCLLVM::insertPosition ( TrueJmp) );
867867 InnerResHi->setDebugLoc (BinOpDebugLoc);
868868
869869 InnerTBB = BasicBlock::Create (*Emu->getContext (), " .shl.inner.true.branch" );
@@ -966,9 +966,9 @@ bool InstExpander::visitLShr(BinaryOperator &BinOp) {
966966 // uniform one in most cases.
967967 Value *NE = IRB->CreateICmpNE (ShAmt, Constant::getNullValue (ShAmt->getType ()));
968968 BasicBlock *JointBB = OldBB->splitBasicBlock (&BinOp);
969- ResLo = PHINode::Create (IRB->getInt32Ty (), 2 , " .lshr.outer.merge.lo" , &BinOp);
969+ ResLo = PHINode::Create (IRB->getInt32Ty (), 2 , " .lshr.outer.merge.lo" , IGCLLVM::insertPosition ( &BinOp) );
970970 cast<Instruction>(ResLo)->setDebugLoc (BinOpDebugLoc);
971- ResHi = PHINode::Create (IRB->getInt32Ty (), 2 , " .lshr.outer.merge.hi" , &BinOp);
971+ ResHi = PHINode::Create (IRB->getInt32Ty (), 2 , " .lshr.outer.merge.hi" , IGCLLVM::insertPosition ( &BinOp) );
972972 cast<Instruction>(ResHi)->setDebugLoc (BinOpDebugLoc);
973973
974974 BasicBlock *TrueBB = BasicBlock::Create (*Emu->getContext (), " .lshr.outer.true.branch" );
@@ -987,9 +987,9 @@ bool InstExpander::visitLShr(BinaryOperator &BinOp) {
987987 // Prepare to generate branches to handle the case where `ShAmt` is less
988988 // than 32 (true branch) or otherwise (false branch).
989989 BasicBlock *InnerJBB = TrueBB->splitBasicBlock (TrueJmp);
990- InnerResLo = PHINode::Create (IRB->getInt32Ty (), 2 , " .lshr.merge.inner.lo" , TrueJmp);
990+ InnerResLo = PHINode::Create (IRB->getInt32Ty (), 2 , " .lshr.merge.inner.lo" , IGCLLVM::insertPosition ( TrueJmp) );
991991 InnerResLo->setDebugLoc (BinOpDebugLoc);
992- InnerResHi = PHINode::Create (IRB->getInt32Ty (), 2 , " .lshr.merge.inner.hi" , TrueJmp);
992+ InnerResHi = PHINode::Create (IRB->getInt32Ty (), 2 , " .lshr.merge.inner.hi" , IGCLLVM::insertPosition ( TrueJmp) );
993993 InnerResHi->setDebugLoc (BinOpDebugLoc);
994994
995995 InnerTBB = BasicBlock::Create (*Emu->getContext (), " .lshr.inner.true.branch" );
@@ -1097,9 +1097,9 @@ bool InstExpander::visitAShr(BinaryOperator &BinOp) {
10971097 // uniform one in most cases.
10981098 Value *NE = IRB->CreateICmpNE (ShAmt, Constant::getNullValue (ShAmt->getType ()));
10991099 BasicBlock *JointBB = OldBB->splitBasicBlock (&BinOp);
1100- ResLo = PHINode::Create (IRB->getInt32Ty (), 2 , " .ashr.outer.merge.lo" , &BinOp);
1100+ ResLo = PHINode::Create (IRB->getInt32Ty (), 2 , " .ashr.outer.merge.lo" , IGCLLVM::insertPosition ( &BinOp) );
11011101 cast<Instruction>(ResLo)->setDebugLoc (BinOpDebugLoc);
1102- ResHi = PHINode::Create (IRB->getInt32Ty (), 2 , " .ashr.outer.merge.hi" , &BinOp);
1102+ ResHi = PHINode::Create (IRB->getInt32Ty (), 2 , " .ashr.outer.merge.hi" , IGCLLVM::insertPosition ( &BinOp) );
11031103 cast<Instruction>(ResHi)->setDebugLoc (BinOpDebugLoc);
11041104
11051105 BasicBlock *TrueBB = BasicBlock::Create (*Emu->getContext (), " .ashr.outer.true.branch" );
@@ -1118,9 +1118,9 @@ bool InstExpander::visitAShr(BinaryOperator &BinOp) {
11181118 // Prepare to generate branches to handle the case where `ShAmt` is less
11191119 // than 32 or otherwise.
11201120 BasicBlock *InnerJBB = TrueBB->splitBasicBlock (TrueJmp);
1121- InnerResLo = PHINode::Create (IRB->getInt32Ty (), 2 , " .ashr.merge.inner.lo" , TrueJmp);
1121+ InnerResLo = PHINode::Create (IRB->getInt32Ty (), 2 , " .ashr.merge.inner.lo" , IGCLLVM::insertPosition ( TrueJmp) );
11221122 InnerResLo->setDebugLoc (BinOpDebugLoc);
1123- InnerResHi = PHINode::Create (IRB->getInt32Ty (), 2 , " .ashr.merge.inner.hi" , TrueJmp);
1123+ InnerResHi = PHINode::Create (IRB->getInt32Ty (), 2 , " .ashr.merge.inner.hi" , IGCLLVM::insertPosition ( TrueJmp) );
11241124 InnerResHi->setDebugLoc (BinOpDebugLoc);
11251125
11261126 InnerTBB = BasicBlock::Create (*Emu->getContext (), " .ashr.inner.true.branch" );
@@ -1490,7 +1490,7 @@ Value *InstExpander::convertUIToFP32(Type *DstTy, Value *Lo, Value *Hi, Instruct
14901490 IRB->SetInsertPoint (Pos);
14911491 DebugLoc PosDebugLoc = Pos->getDebugLoc ();
14921492
1493- PHINode *Res = PHINode::Create (IRB->getInt32Ty (), 2 , " .u2f.outer.merge" , Pos);
1493+ PHINode *Res = PHINode::Create (IRB->getInt32Ty (), 2 , " .u2f.outer.merge" , IGCLLVM::insertPosition ( Pos) );
14941494 Res->setDebugLoc (PosDebugLoc);
14951495
14961496 {
@@ -1510,9 +1510,11 @@ Value *InstExpander::convertUIToFP32(Type *DstTy, Value *Lo, Value *Hi, Instruct
15101510 NE = IRB->CreateICmpNE (ShAmt, Constant::getNullValue (ShAmt->getType ()));
15111511
15121512 BasicBlock *InnerJBB = TrueBB->splitBasicBlock (TrueJmp);
1513- PHINode *InnerResHi = PHINode::Create (IRB->getInt32Ty (), 2 , " .u2f.inner.merge.hi" , TrueJmp);
1513+ PHINode *InnerResHi =
1514+ PHINode::Create (IRB->getInt32Ty (), 2 , " .u2f.inner.merge.hi" , IGCLLVM::insertPosition (TrueJmp));
15141515 InnerResHi->setDebugLoc (PosDebugLoc);
1515- PHINode *InnerResLo = PHINode::Create (IRB->getInt32Ty (), 2 , " .u2f.inner.merge.lo" , TrueJmp);
1516+ PHINode *InnerResLo =
1517+ PHINode::Create (IRB->getInt32Ty (), 2 , " .u2f.inner.merge.lo" , IGCLLVM::insertPosition (TrueJmp));
15161518 InnerResLo->setDebugLoc (PosDebugLoc);
15171519
15181520 BasicBlock *InnerTBB = BasicBlock::Create (*Emu->getContext (), " .u2f.inner.true.branch" );
@@ -1544,7 +1546,8 @@ Value *InstExpander::convertUIToFP32(Type *DstTy, Value *Lo, Value *Hi, Instruct
15441546 NE = IRB->CreateICmpNE (InnerResLo, Constant::getNullValue (InnerResLo->getType ()));
15451547
15461548 BasicBlock *RoundingJBB = InnerJBB->splitBasicBlock (InnerJmp);
1547- PHINode *RoundingRes = PHINode::Create (IRB->getInt32Ty (), 2 , " .u2f.rounding.merge.hi" , InnerJmp);
1549+ PHINode *RoundingRes =
1550+ PHINode::Create (IRB->getInt32Ty (), 2 , " .u2f.rounding.merge.hi" , IGCLLVM::insertPosition (InnerJmp));
15481551 RoundingRes->setDebugLoc (PosDebugLoc);
15491552
15501553 BasicBlock *RoundingBB = BasicBlock::Create (*Emu->getContext (), " .u2f.rounding.branch" );
0 commit comments