From 8d8812c5d7e546b40e0549fd3d82f74c7f6d4ba5 Mon Sep 17 00:00:00 2001 From: Tim Northover Date: Thu, 1 Sep 2016 20:45:41 +0000 Subject: GlobalISel: add a G_PHI instruction to give phis a type. They're another source of generic vregs, which are going to need a type on the definition when we remove the register width from MachineRegisterInfo. llvm-svn: 280412 --- llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'llvm/lib/Target') diff --git a/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp b/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp index 779b624b0f7..26342a19546 100644 --- a/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp +++ b/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp @@ -235,6 +235,12 @@ bool AArch64InstructionSelector::select(MachineInstr &I) const { return true; } + case TargetOpcode::G_PHI: { + I.setDesc(TII.get(TargetOpcode::PHI)); + I.removeTypes(); + return true; + } + case TargetOpcode::G_FRAME_INDEX: { // allocas and G_FRAME_INDEX are only supported in addrspace(0). if (I.getType() != LLT::pointer(0)) { -- cgit v1.2.3