Add explanatory comment.
authorJim Grosbach <grosbach@apple.com>
Fri, 19 Aug 2011 16:52:32 +0000 (16:52 +0000)
committerJim Grosbach <grosbach@apple.com>
Fri, 19 Aug 2011 16:52:32 +0000 (16:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138042 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMInstrThumb.td

index 199691f6c30555ddd509e3ebae681c208581adfb..a6e0ed737bae0db365b60cfa3c8630b91a4d806e 100644 (file)
@@ -125,6 +125,11 @@ def t_addrmode_rr : Operand<i32>,
 
 // t_addrmode_rrs := reg + reg
 //
+// We use separate scaled versions because the Select* functions need
+// to explicitly check for a matching constant and return false here so that
+// the reg+imm forms will match instead. This is a horrible way to do that,
+// as it forces tight coupling between the methods, but it's how selectiondag
+// currently works.
 def t_addrmode_rrs1 : Operand<i32>,
                       ComplexPattern<i32, 2, "SelectThumbAddrModeRI5S1", []> {
   let EncoderMethod = "getThumbAddrModeRegRegOpValue";