Skip to content

Commit

Permalink
[X86] X86CmovConverterPass::convertCmovInstsToBranches - take a copy …
Browse files Browse the repository at this point in the history
…of the DebugLoc not a reference as it may be deleted.

Fixes msan warning due to rG9ca2c50b3601
  • Loading branch information
RKSimon committed May 15, 2021
1 parent bd7b7ca commit 2ed8900
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/Target/X86/X86CmovConversion.cpp
Expand Up @@ -650,7 +650,7 @@ void X86CmovConverterPass::convertCmovInstsToBranches(

MachineInstr &MI = *Group.front();
MachineInstr *LastCMOV = Group.back();
const DebugLoc &DL = MI.getDebugLoc();
DebugLoc DL = MI.getDebugLoc();

X86::CondCode CC = X86::CondCode(X86::getCondFromCMov(MI));
X86::CondCode OppCC = X86::GetOppositeBranchCondition(CC);
Expand Down

0 comments on commit 2ed8900

Please sign in to comment.