File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -270,11 +270,15 @@ void LiveVars::MarkVirtRegAliveInBlock(LiveVars::LVInfo& VRInfo,
270
270
continue ; // We already know the block is live
271
271
272
272
WorkList.push_back (PredBlk);
273
- Instruction* cbr = PredBlk->getTerminator ();
274
- if (cbr && WIA->whichDepend (cbr) != WIAnalysis::UNIFORM)
275
- hasNonUniformBranch = true ;
273
+ // Check if we need to update liveness for uniform variable
274
+ // inside divergent control-flow
276
275
if (PredBlk == MBB->getPrevNode ())
277
276
hasLayoutPred = false ;
277
+ if (hasLayoutPred && VRInfo.uniform ) {
278
+ Instruction* cbr = PredBlk->getTerminator ();
279
+ if (cbr && WIA->whichDepend (cbr) != WIAnalysis::UNIFORM)
280
+ hasNonUniformBranch = true ;
281
+ }
278
282
}
279
283
if (hasLayoutPred && hasNonUniformBranch && VRInfo.uniform ) {
280
284
BasicBlock* simdPred = MBB->getPrevNode ();
You can’t perform that action at this time.
0 commit comments