[clang] 26db178 - [OpenCL][NFC] Refactor vloada_half and vstorea_half decls
Stuart Brady via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 29 09:23:33 PDT 2021
Author: Stuart Brady
Date: 2021-09-29T17:22:39+01:00
New Revision: 26db178cc2b39167a2fd69acfc8ba7ea564f3746
URL: https://github.com/llvm/llvm-project/commit/26db178cc2b39167a2fd69acfc8ba7ea564f3746
DIFF: https://github.com/llvm/llvm-project/commit/26db178cc2b39167a2fd69acfc8ba7ea564f3746.diff
LOG: [OpenCL][NFC] Refactor vloada_half and vstorea_half decls
Group them together with the vload_half and vstore_half decls for
simplicity.
Reviewed By: svenvh
Differential Revision: https://reviews.llvm.org/D110636
Added:
Modified:
clang/lib/Sema/OpenCLBuiltins.td
Removed:
################################################################################
diff --git a/clang/lib/Sema/OpenCLBuiltins.td b/clang/lib/Sema/OpenCLBuiltins.td
index 5d75c2bb1a84..2501e50b8968 100644
--- a/clang/lib/Sema/OpenCLBuiltins.td
+++ b/clang/lib/Sema/OpenCLBuiltins.td
@@ -808,9 +808,6 @@ multiclass VloadVstore<list<AddressSpace> addrspaces, bit defStores> {
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 @@ multiclass VloadVstore<list<AddressSpace> addrspaces, bit defStores> {
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 @@ multiclass VloadVstoreHalf<list<AddressSpace> addrspaces, bit defStores> {
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 @@ multiclass VloadVstoreHalf<list<AddressSpace> addrspaces, bit defStores> {
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>]>;
}
More information about the cfe-commits
mailing list