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>]>;
           }


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>]>;
           }
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D110636: [OpenC... Stuart Brady via Phabricator via cfe-commits

Reply via email to