[PATCH] D110636: [OpenCL][NFC] Refactor vloada_half and vstorea_half decls

Stuart Brady via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 28 09:14:51 PDT 2021


stuart created this revision.
stuart added reviewers: svenvh, Anastasia, airlied, yaxunl.
Herald added a subscriber: ldrumm.
stuart requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Group them together with the vload_half and vstore_half decls for simplicity.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D110636

Files:
  clang/lib/Sema/OpenCLBuiltins.td


Index: clang/lib/Sema/OpenCLBuiltins.td
===================================================================
--- clang/lib/Sema/OpenCLBuiltins.td
+++ clang/lib/Sema/OpenCLBuiltins.td
@@ -808,9 +808,6 @@
         def : Builtin<name, [VectorType<Double, VSize>, Size, PointerType<ConstType<Double>, AS>]>;
         def : Builtin<name, [VectorType<Half, VSize>, Size, PointerType<ConstType<Half>, AS>]>;
       }
-      foreach name = ["vloada_half" # VSize] in {
-        def : Builtin<name, [VectorType<Float, VSize>, Size, PointerType<ConstType<Half>, AS>]>;
-      }
       if defStores then {
         foreach name = ["vstore" # VSize] in {
           def : Builtin<name, [Void, VectorType<Char, VSize>, Size, PointerType<Char, AS>]>;
@@ -825,12 +822,6 @@
           def : Builtin<name, [Void, VectorType<Double, VSize>, Size, PointerType<Double, AS>]>;
           def : Builtin<name, [Void, VectorType<Half, VSize>, Size, PointerType<Half, AS>]>;
         }
-        foreach rnd = ["", "_rte", "_rtz", "_rtp", "_rtn"] in {
-          foreach name = ["vstorea_half" # VSize # rnd] in {
-            def : Builtin<name, [Void, VectorType<Float, VSize>, Size, PointerType<Half, AS>]>;
-            def : Builtin<name, [Void, VectorType<Double, VSize>, Size, PointerType<Half, AS>]>;
-          }
-        }
       }
     }
   }
@@ -849,7 +840,7 @@
   foreach AS = addrspaces in {
     def : Builtin<"vload_half", [Float, Size, PointerType<ConstType<Half>, AS>]>;
     foreach VSize = [2, 3, 4, 8, 16] in {
-      foreach name = ["vload_half" # VSize] in {
+      foreach name = ["vload_half" # VSize, "vloada_half" # VSize] in {
         def : Builtin<name, [VectorType<Float, VSize>, Size, PointerType<ConstType<Half>, AS>]>;
       }
     }
@@ -860,7 +851,7 @@
           def : Builtin<name, [Void, Double, Size, PointerType<Half, AS>]>;
         }
         foreach VSize = [2, 3, 4, 8, 16] in {
-          foreach name = ["vstore_half" # VSize # rnd] in {
+          foreach name = ["vstore_half" # VSize # rnd, "vstorea_half" # VSize # rnd] in {
             def : Builtin<name, [Void, VectorType<Float, VSize>, Size, PointerType<Half, AS>]>;
             def : Builtin<name, [Void, VectorType<Double, VSize>, Size, PointerType<Half, AS>]>;
           }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110636.375603.patch
Type: text/x-patch
Size: 2257 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210928/6d8c7502/attachment.bin>


More information about the cfe-commits mailing list