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/CodeGen/GlobalISel/MachineLegalizer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/GlobalISel/MachineLegalizer.cpp') diff --git a/llvm/lib/CodeGen/GlobalISel/MachineLegalizer.cpp b/llvm/lib/CodeGen/GlobalISel/MachineLegalizer.cpp index cc3d4ecd7c6..5a15f65c45e 100644 --- a/llvm/lib/CodeGen/GlobalISel/MachineLegalizer.cpp +++ b/llvm/lib/CodeGen/GlobalISel/MachineLegalizer.cpp @@ -30,8 +30,10 @@ MachineLegalizer::MachineLegalizer() : TablesInitialized(false) { DefaultActions[TargetOpcode::G_ANYEXT] = Legal; DefaultActions[TargetOpcode::G_TRUNC] = Legal; - // G_TYPE is essentially an annotated COPY so it's always legal. + // G_TYPE and G_PHI are essentially an annotated COPY/PHI instructions so + // they're always legal. DefaultActions[TargetOpcode::G_TYPE] = Legal; + DefaultActions[TargetOpcode::G_PHI] = Legal; DefaultActions[TargetOpcode::G_INTRINSIC] = Legal; DefaultActions[TargetOpcode::G_INTRINSIC_W_SIDE_EFFECTS] = Legal; -- cgit v1.2.3