[Beignet] [PATCH V2 2/2] GBE: handle Instrinsic trap and unreachable instruction.

Ruiling Song ruiling.song at intel.com
Tue Jul 19 08:41:29 UTC 2016


llvm may generate these instructions. simply do nothing now.

Signed-off-by: Ruiling Song <ruiling.song at intel.com>
---
 backend/src/llvm/llvm_gen_backend.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/backend/src/llvm/llvm_gen_backend.cpp b/backend/src/llvm/llvm_gen_backend.cpp
index 9ab2f69..ec9fbc5 100644
--- a/backend/src/llvm/llvm_gen_backend.cpp
+++ b/backend/src/llvm/llvm_gen_backend.cpp
@@ -714,7 +714,7 @@ namespace gbe
     void visitResumeInst(ResumeInst &I) {NOT_SUPPORTED;}
     void visitInlineAsm(CallInst &I) {NOT_SUPPORTED;}
     void visitIndirectBrInst(IndirectBrInst &I) {NOT_SUPPORTED;}
-    void visitUnreachableInst(UnreachableInst &I) {NOT_SUPPORTED;}
+    void visitUnreachableInst(UnreachableInst &I) {;}
     void visitGetElementPtrInst(GetElementPtrInst &I) {NOT_SUPPORTED;}
     void visitInsertValueInst(InsertValueInst &I) {NOT_SUPPORTED;}
     template <bool IsLoad, typename T> void visitLoadOrStore(T &I);
@@ -3509,6 +3509,7 @@ namespace gbe
           break;
 #endif /* LLVM_VERSION_MINOR >= 2 */
           case Intrinsic::debugtrap:
+          case Intrinsic::trap:
           case Intrinsic::dbg_value:
           case Intrinsic::dbg_declare:
           break;
@@ -4121,6 +4122,7 @@ namespace gbe
           break;
 #endif /* LLVM_VERSION_MINOR >= 2 */
           case Intrinsic::debugtrap:
+          case Intrinsic::trap:
           case Intrinsic::dbg_value:
           case Intrinsic::dbg_declare:
           break;
-- 
2.4.1



More information about the Beignet mailing list