Skip to content

Commit f01b68e

Browse files
author
Krzysztof Parzyszek
committed
[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
1 parent db2aa9f commit f01b68e

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

clang/lib/Sema/SemaChecking.cpp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3629,6 +3629,31 @@ bool Sema::CheckHexagonBuiltinArgument(unsigned BuiltinID, CallExpr *TheCall) {
36293629
{ Hexagon::BI__builtin_HEXAGON_V6_vrsadubi_acc, {{ 3, false, 1, 0 }} },
36303630
{ Hexagon::BI__builtin_HEXAGON_V6_vrsadubi_acc_128B,
36313631
{{ 3, false, 1, 0 }} },
3632+
3633+
{ Hexagon::BI__builtin_HEXAGON_V6_v6mpyhubs10, {{ 2, false, 2, 0 }} },
3634+
{ Hexagon::BI__builtin_HEXAGON_V6_v6mpyhubs10_128B,
3635+
{{ 2, false, 2, 0 }} },
3636+
{ Hexagon::BI__builtin_HEXAGON_V6_v6mpyhubs10_vxx,
3637+
{{ 3, false, 2, 0 }} },
3638+
{ Hexagon::BI__builtin_HEXAGON_V6_v6mpyhubs10_vxx_128B,
3639+
{{ 3, false, 2, 0 }} },
3640+
{ Hexagon::BI__builtin_HEXAGON_V6_v6mpyvubs10, {{ 2, false, 2, 0 }} },
3641+
{ Hexagon::BI__builtin_HEXAGON_V6_v6mpyvubs10_128B,
3642+
{{ 2, false, 2, 0 }} },
3643+
{ Hexagon::BI__builtin_HEXAGON_V6_v6mpyvubs10_vxx,
3644+
{{ 3, false, 2, 0 }} },
3645+
{ Hexagon::BI__builtin_HEXAGON_V6_v6mpyvubs10_vxx_128B,
3646+
{{ 3, false, 2, 0 }} },
3647+
{ Hexagon::BI__builtin_HEXAGON_V6_vlutvvbi, {{ 2, false, 3, 0 }} },
3648+
{ Hexagon::BI__builtin_HEXAGON_V6_vlutvvbi_128B, {{ 2, false, 3, 0 }} },
3649+
{ Hexagon::BI__builtin_HEXAGON_V6_vlutvvb_oracci, {{ 3, false, 3, 0 }} },
3650+
{ Hexagon::BI__builtin_HEXAGON_V6_vlutvvb_oracci_128B,
3651+
{{ 3, false, 3, 0 }} },
3652+
{ Hexagon::BI__builtin_HEXAGON_V6_vlutvwhi, {{ 2, false, 3, 0 }} },
3653+
{ Hexagon::BI__builtin_HEXAGON_V6_vlutvwhi_128B, {{ 2, false, 3, 0 }} },
3654+
{ Hexagon::BI__builtin_HEXAGON_V6_vlutvwh_oracci, {{ 3, false, 3, 0 }} },
3655+
{ Hexagon::BI__builtin_HEXAGON_V6_vlutvwh_oracci_128B,
3656+
{{ 3, false, 3, 0 }} },
36323657
};
36333658

36343659
// Use a dynamically initialized static to sort the table exactly once on

clang/test/Headers/hexagon-hvx-headers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ void test_hvx_protos(float a, unsigned int b) {
3333
HVX_VectorPair c;
3434
// CHECK-64: call <32 x i32> @llvm.hexagon.V6.v6mpyhubs10
3535
// CHECK: call <64 x i32> @llvm.hexagon.V6.v6mpyhubs10.128B
36-
c = Q6_Ww_v6mpy_WubWbI_h(c, c, 12);
36+
c = Q6_Ww_v6mpy_WubWbI_h(c, c, 2);
3737
}

0 commit comments

Comments
 (0)