[clang] f01b68e - [Hexagon] Add checks for immediate arguments for remaining builtins
Krzysztof Parzyszek via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 18 11:10:02 PST 2022
Author: Krzysztof Parzyszek
Date: 2022-11-18T11:09:41-08:00
New Revision: f01b68e4bee7ccf92f125b1100367804b43f6a7e
URL: https://github.com/llvm/llvm-project/commit/f01b68e4bee7ccf92f125b1100367804b43f6a7e
DIFF: https://github.com/llvm/llvm-project/commit/f01b68e4bee7ccf92f125b1100367804b43f6a7e.diff
LOG: [Hexagon] Add checks for immediate arguments for remaining builtins
Checks for builtins for the following instructions were aded:
V6_v6mpyhubs10
V6_v6mpyhubs10_vxx
V6_v6mpyvubs10
V6_v6mpyvubs10_vxx
V6_vlutvvbi
V6_vlutvvb_oracci
V6_vlutvwhi
V6_vlutvwh_oracci
Added:
Modified:
clang/lib/Sema/SemaChecking.cpp
clang/test/Headers/hexagon-hvx-headers.c
Removed:
################################################################################
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index 75fb822f392dd..e3b1d5f7f9e45 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -3629,6 +3629,31 @@ bool Sema::CheckHexagonBuiltinArgument(unsigned BuiltinID, CallExpr *TheCall) {
{ Hexagon::BI__builtin_HEXAGON_V6_vrsadubi_acc, {{ 3, false, 1, 0 }} },
{ Hexagon::BI__builtin_HEXAGON_V6_vrsadubi_acc_128B,
{{ 3, false, 1, 0 }} },
+
+ { Hexagon::BI__builtin_HEXAGON_V6_v6mpyhubs10, {{ 2, false, 2, 0 }} },
+ { Hexagon::BI__builtin_HEXAGON_V6_v6mpyhubs10_128B,
+ {{ 2, false, 2, 0 }} },
+ { Hexagon::BI__builtin_HEXAGON_V6_v6mpyhubs10_vxx,
+ {{ 3, false, 2, 0 }} },
+ { Hexagon::BI__builtin_HEXAGON_V6_v6mpyhubs10_vxx_128B,
+ {{ 3, false, 2, 0 }} },
+ { Hexagon::BI__builtin_HEXAGON_V6_v6mpyvubs10, {{ 2, false, 2, 0 }} },
+ { Hexagon::BI__builtin_HEXAGON_V6_v6mpyvubs10_128B,
+ {{ 2, false, 2, 0 }} },
+ { Hexagon::BI__builtin_HEXAGON_V6_v6mpyvubs10_vxx,
+ {{ 3, false, 2, 0 }} },
+ { Hexagon::BI__builtin_HEXAGON_V6_v6mpyvubs10_vxx_128B,
+ {{ 3, false, 2, 0 }} },
+ { Hexagon::BI__builtin_HEXAGON_V6_vlutvvbi, {{ 2, false, 3, 0 }} },
+ { Hexagon::BI__builtin_HEXAGON_V6_vlutvvbi_128B, {{ 2, false, 3, 0 }} },
+ { Hexagon::BI__builtin_HEXAGON_V6_vlutvvb_oracci, {{ 3, false, 3, 0 }} },
+ { Hexagon::BI__builtin_HEXAGON_V6_vlutvvb_oracci_128B,
+ {{ 3, false, 3, 0 }} },
+ { Hexagon::BI__builtin_HEXAGON_V6_vlutvwhi, {{ 2, false, 3, 0 }} },
+ { Hexagon::BI__builtin_HEXAGON_V6_vlutvwhi_128B, {{ 2, false, 3, 0 }} },
+ { Hexagon::BI__builtin_HEXAGON_V6_vlutvwh_oracci, {{ 3, false, 3, 0 }} },
+ { Hexagon::BI__builtin_HEXAGON_V6_vlutvwh_oracci_128B,
+ {{ 3, false, 3, 0 }} },
};
// Use a dynamically initialized static to sort the table exactly once on
diff --git a/clang/test/Headers/hexagon-hvx-headers.c b/clang/test/Headers/hexagon-hvx-headers.c
index afea9a6bee298..835dde4956a1d 100644
--- a/clang/test/Headers/hexagon-hvx-headers.c
+++ b/clang/test/Headers/hexagon-hvx-headers.c
@@ -33,5 +33,5 @@ void test_hvx_protos(float a, unsigned int b) {
HVX_VectorPair c;
// CHECK-64: call <32 x i32> @llvm.hexagon.V6.v6mpyhubs10
// CHECK: call <64 x i32> @llvm.hexagon.V6.v6mpyhubs10.128B
- c = Q6_Ww_v6mpy_WubWbI_h(c, c, 12);
+ c = Q6_Ww_v6mpy_WubWbI_h(c, c, 2);
}
More information about the cfe-commits
mailing list