diff clang/lib/AST/ASTContext.cpp @ 232:70dce7da266c llvm-original

llvm original Jul 20 16:41:34 2021
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 21 Jul 2021 10:27:27 +0900
parents 5f17cb93ff66
children c4bab56944e8
line wrap: on
line diff
--- a/clang/lib/AST/ASTContext.cpp	Sun Jul 18 22:43:00 2021 +0900
+++ b/clang/lib/AST/ASTContext.cpp	Wed Jul 21 10:27:27 2021 +0900
@@ -3869,7 +3869,7 @@
             llvm::ElementCount::getScalable(NumEls), NF};
 #define RVV_VECTOR_TYPE_FLOAT(Name, Id, SingletonId, NumEls, ElBits, NF)       \
   case BuiltinType::Id:                                                        \
-    return {ElBits == 16 ? HalfTy : (ElBits == 32 ? FloatTy : DoubleTy),       \
+    return {ElBits == 16 ? Float16Ty : (ElBits == 32 ? FloatTy : DoubleTy),    \
             llvm::ElementCount::getScalable(NumEls), NF};
 #define RVV_PREDICATE_TYPE(Name, Id, SingletonId, NumEls)                      \
   case BuiltinType::Id:                                                        \
@@ -10370,6 +10370,11 @@
   // Read the base type.
   switch (*Str++) {
   default: llvm_unreachable("Unknown builtin type letter!");
+  case 'x':
+    assert(HowLong == 0 && !Signed && !Unsigned &&
+           "Bad modifiers used with 'x'!");
+    Type = Context.Float16Ty;
+    break;
   case 'y':
     assert(HowLong == 0 && !Signed && !Unsigned &&
            "Bad modifiers used with 'y'!");