================
@@ -424,72 +432,87 @@ const std::array<SVEEmitter::ReinterpretTypeInfo, 12> 
SVEEmitter::Reinterprets =
 
//===----------------------------------------------------------------------===//
 
 std::string SVEType::builtin_str() const {
-  std::string S;
-  if (isVoid())
-    return "v";
+  std::string OutStr;
 
   if (isScalarPredicate())
     return "b";
 
   if (isSvcount())
     return "Qa";
 
-  if (isVoidPointer())
-    S += "v";
-  else if (!isFloatingPoint())
-    switch (ElementBitwidth) {
-    case 1: S += "b"; break;
-    case 8: S += "c"; break;
-    case 16: S += "s"; break;
-    case 32: S += "i"; break;
-    case 64: S += "Wi"; break;
-    case 128: S += "LLLi"; break;
-    default: llvm_unreachable("Unhandled case!");
-    }
-  else if (isFloat())
+  if (isVoid()) {
----------------
sdesmalen-arm wrote:

Could you change this `if-else if-else if...else` into a switch statement, 
preferably without a `default` statement (so that it is clear what types the 
`else` case applies to, see my question below)

https://github.com/llvm/llvm-project/pull/117717
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to