mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Hexagon: add support for predicate-GPR copies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175102 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ff91f2ef47
commit
666e0d3bc4
@ -426,6 +426,18 @@ void HexagonInstrInfo::copyPhysReg(MachineBasicBlock &MBB,
|
||||
BuildMI(MBB, I, DL, get(Hexagon::TFCR), DestReg).addReg(SrcReg);
|
||||
return;
|
||||
}
|
||||
if (Hexagon::PredRegsRegClass.contains(SrcReg) &&
|
||||
Hexagon::IntRegsRegClass.contains(DestReg)) {
|
||||
BuildMI(MBB, I, DL, get(Hexagon::TFR_RsPd), DestReg).
|
||||
addReg(SrcReg, getKillRegState(KillSrc));
|
||||
return;
|
||||
}
|
||||
if (Hexagon::IntRegsRegClass.contains(SrcReg) &&
|
||||
Hexagon::PredRegsRegClass.contains(DestReg)) {
|
||||
BuildMI(MBB, I, DL, get(Hexagon::TFR_PdRs), DestReg).
|
||||
addReg(SrcReg, getKillRegState(KillSrc));
|
||||
return;
|
||||
}
|
||||
|
||||
llvm_unreachable("Unimplemented");
|
||||
}
|
||||
|
8
test/CodeGen/Hexagon/predicate-copy.ll
Normal file
8
test/CodeGen/Hexagon/predicate-copy.ll
Normal file
@ -0,0 +1,8 @@
|
||||
; RUN: llc -march=hexagon -mcpu=hexagonv4 -O3 < %s | FileCheck %s
|
||||
|
||||
; CHECK: r{{[0-9]+}} = p{{[0-9]+}}
|
||||
define i1 @foo() {
|
||||
entry:
|
||||
ret i1 false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user