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) {
3953
3953
// BB4
3954
3954
//
3955
3955
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
+ }
3958
3972
BB2->setName (" select.false" );
3959
3973
BB4->setName (" select.true" );
3960
3974
You can’t perform that action at this time.
0 commit comments