Index: lib/Target/AMDGPU/SILowerControlFlow.cpp =================================================================== --- lib/Target/AMDGPU/SILowerControlFlow.cpp +++ lib/Target/AMDGPU/SILowerControlFlow.cpp @@ -453,8 +453,8 @@ return; for (const auto &SrcOp : Def->explicit_operands()) - if (SrcOp.isUse() && (!SrcOp.isReg() || - TargetRegisterInfo::isVirtualRegister(SrcOp.getReg()) || + if (SrcOp.isReg() && SrcOp.isUse() && + (TargetRegisterInfo::isVirtualRegister(SrcOp.getReg()) || SrcOp.getReg() == AMDGPU::EXEC)) Src.push_back(SrcOp); }