Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: src/IceGlobalContext.cpp

Issue 353553004: Add support for vector types and vector constants. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Print out types in error messages. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/IceGlobalContext.cpp
diff --git a/src/IceGlobalContext.cpp b/src/IceGlobalContext.cpp
index 7e89a41dad133960ff7cacc24735b61fc25f6e28..d2940807a1e5f8e45fb33cd7beaf51c102ba2072 100644
--- a/src/IceGlobalContext.cpp
+++ b/src/IceGlobalContext.cpp
@@ -232,6 +232,19 @@ Constant *GlobalContext::getConstantZero(Type Ty) {
return getConstantFloat(0);
case IceType_f64:
return getConstantDouble(0);
+ case IceType_v4i1:
+ case IceType_v8i1:
+ case IceType_v16i1:
+ case IceType_v16i8:
+ case IceType_v8i16:
+ case IceType_v4i32:
+ case IceType_v4f32: {
+ IceString Str;
+ llvm::raw_string_ostream BaseOS(Str);
+ Ostream OS(&BaseOS);
+ OS << "Unsupported constant type: " << Ty;
+ llvm_unreachable(BaseOS.str().c_str());
+ } break;
case IceType_void:
case IceType_NUM:
break;
@@ -251,6 +264,19 @@ ConstantList GlobalContext::getConstantPool(Type Ty) const {
return ConstPool->Floats.getConstantPool();
case IceType_f64:
return ConstPool->Doubles.getConstantPool();
+ case IceType_v4i1:
+ case IceType_v8i1:
+ case IceType_v16i1:
+ case IceType_v16i8:
+ case IceType_v8i16:
+ case IceType_v4i32:
+ case IceType_v4f32: {
+ IceString Str;
+ llvm::raw_string_ostream BaseOS(Str);
+ Ostream OS(&BaseOS);
+ OS << "Unsupported constant type: " << Ty;
+ llvm_unreachable(BaseOS.str().c_str());
+ } break;
case IceType_void:
case IceType_NUM:
break;
« no previous file with comments | « src/IceConverter.cpp ('k') | src/IceInstX8632.h » ('j') | src/IceTargetLoweringX8632.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698