[clang] [llvm] Move several vector intrinsics out of experimental namespace (PR #88748)

Craig Topper via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 15 12:28:52 PDT 2024


================
@@ -1099,6 +1099,25 @@ static bool upgradeIntrinsicFunction1(Function *F, Function *&NewFn,
         return true;
       }
 
+      ID = StringSwitch<Intrinsic::ID>(Name)
+               .StartsWith("splice.", Intrinsic::vector_splice)
+               .StartsWith("reverse.", Intrinsic::vector_reverse)
+               .StartsWith("interleave2.", Intrinsic::vector_interleave2)
+               .StartsWith("deinterleave2.", Intrinsic::vector_deinterleave2)
+               .Default(Intrinsic::not_intrinsic);
+      if (ID != Intrinsic::not_intrinsic) {
+        const auto *FT = F->getFunctionType();
+        rename(F);
+        if (ID == Intrinsic::vector_interleave2)
+          NewFn = Intrinsic::getDeclaration(F->getParent(), ID,
+                                            FT->getReturnType());
+        else {
----------------
topperc wrote:

Please be consistent about the use of curly braces between `if` and `else`

https://github.com/llvm/llvm-project/pull/88748


More information about the cfe-commits mailing list