[llvm-commits] [llvm] r132717 - /llvm/trunk/lib/Target/Mips/MipsInstrInfo.td

Akira Hatanaka ahatanak at gmail.com
Tue Jun 7 11:00:15 PDT 2011


Author: ahatanak
Date: Tue Jun  7 13:00:14 2011
New Revision: 132717

URL: http://llvm.org/viewvc/llvm-project?rev=132717&view=rev
Log:
Add comments for wrapper node patterns in MipsInstrInfo.td.

Modified:
    llvm/trunk/lib/Target/Mips/MipsInstrInfo.td

Modified: llvm/trunk/lib/Target/Mips/MipsInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsInstrInfo.td?rev=132717&r1=132716&r2=132717&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsInstrInfo.td (original)
+++ llvm/trunk/lib/Target/Mips/MipsInstrInfo.td Tue Jun  7 13:00:14 2011
@@ -87,7 +87,16 @@
 def MipsDivRemU   : SDNode<"MipsISD::DivRemU", SDT_MipsDivRem,
                            [SDNPOutGlue]>;
 
-// wrapper node
+// Target constant nodes that are not part of any isel patterns and remain
+// unchanged can cause instructions with illegal operands to be emitted.
+// Wrapper node patterns give the instruction selector a chance to replace
+// target constant nodes that would otherwise remain unchanged with ADDiu
+// nodes. Without these wrapper node patterns, the following conditional move
+// instrucion is emitted when function cmov2 in test/CodeGen/Mips/cmov.ll is
+// compiled: 
+//  movn  %got(d)($gp), %got(c)($gp), $4
+// This instruction is illegal since movn can take only register operands.
+
 def MipsWrapperPIC    : SDNode<"MipsISD::WrapperPIC",  SDTIntUnaryOp>;
 
 //===----------------------------------------------------------------------===//





More information about the llvm-commits mailing list