mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-07-20 10:30:03 +00:00
Mark dead physregdefs dead immediately. This helps MachineSink and
MachineLICM and other things which run before LiveVariables is run. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85360 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
83f6120c9a
commit
a104d1eab2
@ -571,6 +571,8 @@ void InstrEmitter::EmitNode(SDNode *Node, bool IsClone, bool IsCloned,
|
|||||||
unsigned Reg = II.getImplicitDefs()[i - II.getNumDefs()];
|
unsigned Reg = II.getImplicitDefs()[i - II.getNumDefs()];
|
||||||
if (Node->hasAnyUseOfValue(i))
|
if (Node->hasAnyUseOfValue(i))
|
||||||
EmitCopyFromReg(Node, i, IsClone, IsCloned, Reg, VRBaseMap);
|
EmitCopyFromReg(Node, i, IsClone, IsCloned, Reg, VRBaseMap);
|
||||||
|
else
|
||||||
|
MI->addRegisterDead(Reg, TRI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -41,3 +41,18 @@ bb:
|
|||||||
return:
|
return:
|
||||||
ret void
|
ret void
|
||||||
}
|
}
|
||||||
|
|
||||||
|
; Sink instructions with dead EFLAGS defs.
|
||||||
|
|
||||||
|
; CHECK: je
|
||||||
|
; CHECK-NEXT: orb
|
||||||
|
|
||||||
|
define zeroext i8 @zzz(i8 zeroext %a, i8 zeroext %b) nounwind readnone {
|
||||||
|
entry:
|
||||||
|
%tmp = zext i8 %a to i32 ; <i32> [#uses=1]
|
||||||
|
%tmp2 = icmp eq i8 %a, 0 ; <i1> [#uses=1]
|
||||||
|
%tmp3 = or i8 %b, -128 ; <i8> [#uses=1]
|
||||||
|
%tmp4 = and i8 %b, 127 ; <i8> [#uses=1]
|
||||||
|
%b_addr.0 = select i1 %tmp2, i8 %tmp4, i8 %tmp3 ; <i8> [#uses=1]
|
||||||
|
ret i8 %b_addr.0
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user