File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
IGC/VectorCompiler/lib/GenXCodeGen Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -3953,8 +3953,22 @@ bool GenXLowering::lowerBoolScalarSelect(SelectInst *SI) {
39533953 // BB4
39543954 //
39553955 auto BB1 = SI->getParent ();
3956- auto BB2 = SplitBlock (BB1, SI, DT);
3957- auto BB4 = SplitEdge (BB1, BB2, DT);
3956+ auto BB_ReturnedBySpitBlock = SplitBlock (BB1, SI, DT);
3957+ auto BB_ReturnedBySplitEdge = SplitEdge (BB1, BB_ReturnedBySpitBlock, DT);
3958+
3959+ BasicBlock *BB2;
3960+ BasicBlock *BB4;
3961+ // Make sure that BB2 is predecessor of BB4
3962+ if (BB_ReturnedBySpitBlock->getSinglePredecessor () == BB_ReturnedBySplitEdge)
3963+ {
3964+ BB2 = BB_ReturnedBySplitEdge;
3965+ BB4 = BB_ReturnedBySpitBlock;
3966+ }
3967+ else
3968+ {
3969+ BB4 = BB_ReturnedBySplitEdge;
3970+ BB2 = BB_ReturnedBySpitBlock;
3971+ }
39583972 BB2->setName (" select.false" );
39593973 BB4->setName (" select.true" );
39603974
You can’t perform that action at this time.
0 commit comments