Avoid crashing on Arguments, just silently miscompile
authorChris Lattner <sabre@nondot.org>
Wed, 4 Dec 2002 17:15:34 +0000 (17:15 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 4 Dec 2002 17:15:34 +0000 (17:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4916 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/InstSelectSimple.cpp
lib/Target/X86/X86ISelSimple.cpp

index b646ed3644253c34b9973ca9d46128bd51a0b38e..27c5d061c266e7c5593a25fabe34c6e5d775f1ea 100644 (file)
@@ -138,6 +138,8 @@ namespace {
       } else if (GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
         // Move the address of the global into the register
         BuildMI(BB, X86::MOVir32, 1, Reg).addReg(GV);
+      } else if (Argument *A = dyn_cast<Argument>(V)) {
+        std::cerr << "ERROR: Arguments not implemented in SimpleInstSel\n";
       } else {
         assert(0 && "Don't know how to handle a value of this type!");
       }
index b646ed3644253c34b9973ca9d46128bd51a0b38e..27c5d061c266e7c5593a25fabe34c6e5d775f1ea 100644 (file)
@@ -138,6 +138,8 @@ namespace {
       } else if (GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
         // Move the address of the global into the register
         BuildMI(BB, X86::MOVir32, 1, Reg).addReg(GV);
+      } else if (Argument *A = dyn_cast<Argument>(V)) {
+        std::cerr << "ERROR: Arguments not implemented in SimpleInstSel\n";
       } else {
         assert(0 && "Don't know how to handle a value of this type!");
       }