Skip to content

Commit

Permalink
[X86] Reduce scope of DestReg and use specific Register type not unsi…
Browse files Browse the repository at this point in the history
…gned. NFCI.
  • Loading branch information
RKSimon committed Oct 31, 2020
1 parent ae80ac6 commit 30a1d91
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions llvm/lib/Target/X86/X86FastISel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2708,10 +2708,9 @@ bool X86FastISel::fastLowerIntrinsicCall(const IntrinsicInst *II) {
// movq (%rax), %rax
// movq (%rax), %rax
// ...
unsigned DestReg;
unsigned Depth = cast<ConstantInt>(II->getOperand(0))->getZExtValue();
while (Depth--) {
DestReg = createResultReg(RC);
Register DestReg = createResultReg(RC);
addDirectMem(BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DbgLoc,
TII.get(Opc), DestReg), SrcReg);
SrcReg = DestReg;
Expand Down

0 comments on commit 30a1d91

Please sign in to comment.