[llvm-commits] [llvm] r55005 - /llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp

Dan Gohman gohman at apple.com
Tue Aug 19 13:43:22 PDT 2008


Author: djg
Date: Tue Aug 19 15:43:22 2008
New Revision: 55005

URL: http://llvm.org/viewvc/llvm-project?rev=55005&view=rev
Log:
Handle the case where target-specific fastisel code doesn't have
a desired opcode.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp?rev=55005&r1=55004&r2=55005&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Tue Aug 19 15:43:22 2008
@@ -33,6 +33,11 @@
         return I;
       }
       unsigned ResultReg = FastEmit_rr(VT.getSimpleVT(), ISD::ADD, Op0, Op1);
+      if (ResultReg == 0) {
+        // Target-specific code wasn't able to find a machine opcode for
+        // the given ISD opcode and type. Halt "fast" selection and bail.
+        return I;
+      }
       ValueMap[I] = ResultReg;
       break;
     }





More information about the llvm-commits mailing list