mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-12 07:37:34 +00:00
Never add a kill flag to a constrained physical register in a two-addr instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77906 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0e6a4efdd4
commit
ece4818516
@ -1041,6 +1041,9 @@ bool MachineInstr::addRegisterKilled(unsigned IncomingReg,
|
||||
if (MO.isKill())
|
||||
// The register is already marked kill.
|
||||
return true;
|
||||
if (isPhysReg && isRegTiedToDefOperand(i))
|
||||
// Two-address uses of physregs must not be marked kill.
|
||||
return true;
|
||||
MO.setIsKill();
|
||||
Found = true;
|
||||
}
|
||||
|
@ -1,7 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=bfin > %t
|
||||
; XFAIL: *
|
||||
; Assertion failed: (isUsed(Reg) && "Using an undefined register!")
|
||||
; function forward, file RegisterScavenging.cpp, line 259.
|
||||
|
||||
define i1 @cmp3(i32 %A) {
|
||||
%R = icmp uge i32 %A, 2
|
||||
|
@ -1,7 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=bfin > %t
|
||||
; XFAIL: *
|
||||
; Assertion failed: (isUsed(Reg) && "Using an undefined register!"),
|
||||
; function forward, file RegisterScavenging.cpp, line 259.
|
||||
|
||||
; The DAG combiner may sometimes create illegal i16 SETCC operations when run
|
||||
; after LegalizeOps. Try to tease out all the optimizations in
|
||||
|
Loading…
x
Reference in New Issue
Block a user