diff options
author | Chris Lattner <sabre@nondot.org> | 2004-10-17 02:42:42 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-10-17 02:42:42 +0000 |
commit | d14d5b422371c1e10ed1866cd6e0c7ac33738a79 (patch) | |
tree | 64d08083f15ee1776fed7a85b6ac72f045989d41 | |
parent | da0a22b7ace53e256a01c4f2b9e6d46ecbdd91bb (diff) | |
download | external_llvm-d14d5b422371c1e10ed1866cd6e0c7ac33738a79.zip external_llvm-d14d5b422371c1e10ed1866cd6e0c7ac33738a79.tar.gz external_llvm-d14d5b422371c1e10ed1866cd6e0c7ac33738a79.tar.bz2 |
Add support for unreachable and undef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17074 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/Sparc/SparcV8ISelSimple.cpp | 6 | ||||
-rw-r--r-- | lib/Target/SparcV8/SparcV8ISelSimple.cpp | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/Target/Sparc/SparcV8ISelSimple.cpp b/lib/Target/Sparc/SparcV8ISelSimple.cpp index 93711ea..5117a75 100644 --- a/lib/Target/Sparc/SparcV8ISelSimple.cpp +++ b/lib/Target/Sparc/SparcV8ISelSimple.cpp @@ -90,6 +90,7 @@ namespace { void visitCallInst(CallInst &I); void visitReturnInst(ReturnInst &I); void visitBranchInst(BranchInst &I); + void visitUnreachableInst(UnreachableInst &I) {} void visitCastInst(CastInst &I); void visitLoadInst(LoadInst &I); void visitStoreInst(StoreInst &I); @@ -230,6 +231,11 @@ void V8ISel::copyConstantToRegister(MachineBasicBlock *MBB, std::cerr << "Copying this constant expr not yet handled: " << *CE; abort(); } + } else if (isa<UndefValue>(C)) { + BuildMI(*MBB, IP, V8::IMPLICIT_DEF, 0, R); + if (getClassB (C->getType ()) == cLong) + BuildMI(*MBB, IP, V8::IMPLICIT_DEF, 0, R+1); + return; } if (C->getType()->isIntegral ()) { diff --git a/lib/Target/SparcV8/SparcV8ISelSimple.cpp b/lib/Target/SparcV8/SparcV8ISelSimple.cpp index 93711ea..5117a75 100644 --- a/lib/Target/SparcV8/SparcV8ISelSimple.cpp +++ b/lib/Target/SparcV8/SparcV8ISelSimple.cpp @@ -90,6 +90,7 @@ namespace { void visitCallInst(CallInst &I); void visitReturnInst(ReturnInst &I); void visitBranchInst(BranchInst &I); + void visitUnreachableInst(UnreachableInst &I) {} void visitCastInst(CastInst &I); void visitLoadInst(LoadInst &I); void visitStoreInst(StoreInst &I); @@ -230,6 +231,11 @@ void V8ISel::copyConstantToRegister(MachineBasicBlock *MBB, std::cerr << "Copying this constant expr not yet handled: " << *CE; abort(); } + } else if (isa<UndefValue>(C)) { + BuildMI(*MBB, IP, V8::IMPLICIT_DEF, 0, R); + if (getClassB (C->getType ()) == cLong) + BuildMI(*MBB, IP, V8::IMPLICIT_DEF, 0, R+1); + return; } if (C->getType()->isIntegral ()) { |