[llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp

Evan Cheng evan.cheng at apple.com
Mon Dec 19 16:06:29 PST 2005



Changes in directory llvm/utils/TableGen:

DAGISelEmitter.cpp updated: 1.105 -> 1.106
---
Log message:

Lefted out a fix in the previous check in.


---
Diffs of the changes:  (+7 -1)

 DAGISelEmitter.cpp |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletion(-)


Index: llvm/utils/TableGen/DAGISelEmitter.cpp
diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.105 llvm/utils/TableGen/DAGISelEmitter.cpp:1.106
--- llvm/utils/TableGen/DAGISelEmitter.cpp:1.105	Mon Dec 19 16:40:04 2005
+++ llvm/utils/TableGen/DAGISelEmitter.cpp	Mon Dec 19 18:06:17 2005
@@ -2134,7 +2134,13 @@
           }
         }
 
-        OS << "      return Result.getValue(N.ResNo);\n";
+        // FIXME: this only works because (for now) an instruction can either
+        // produce a single result or a single flag.
+        if (II.hasCtrlDep && NumImpResults > 0)
+          OS << "      return (N.ResNo) ? Chain : Result.getValue(1);"
+             << "   // Chain comes before flag.\n";
+        else
+          OS << "      return Result.getValue(N.ResNo);\n";
       } else {
         // If this instruction is the root, and if there is only one use of it,
         // use SelectNodeTo instead of getTargetNode to avoid an allocation.






More information about the llvm-commits mailing list