Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / Headers / hexagon-hvx-headers.c
blob835dde4956a1d710987663e18e427b5787f7dc3c
1 // REQUIRES: hexagon-registered-target
3 // RUN: %clang_cc1 -O0 -internal-isystem %S/../../lib/Headers/ \
4 // RUN: -target-cpu hexagonv68 -triple hexagon-unknown-elf \
5 // RUN: -target-feature +hvx-length128b -target-feature +hvxv68 \
6 // RUN: -emit-llvm %s -o - | FileCheck --check-prefix=CHECK %s
8 // RUN: %clang_cc1 -O0 -internal-isystem %S/../../lib/Headers/ \
9 // RUN: -target-cpu hexagonv68 -triple hexagon-unknown-elf -DDIRECT \
10 // RUN: -target-feature +hvx-length128b -target-feature +hvxv68 \
11 // RUN: -emit-llvm %s -o - | FileCheck --check-prefix=CHECK %s
13 // RUN: %clang_cc1 -O0 -internal-isystem %S/../../lib/Headers/ \
14 // RUN: -target-cpu hexagonv68 -triple hexagon-unknown-elf -x c++ \
15 // RUN: -target-feature +hvx-length128b -target-feature +hvxv68 \
16 // RUN: -emit-llvm %s -o - | FileCheck --check-prefix=CHECK %s
18 // RUN: %clang_cc1 -O0 -internal-isystem %S/../../lib/Headers/ \
19 // RUN: -target-cpu hexagonv68 -triple hexagon-unknown-elf \
20 // RUN: -target-feature +hvx-length64b -target-feature +hvxv68 \
21 // RUN: -emit-llvm %s -o - | FileCheck --check-prefix=CHECK-64 %s
23 #ifdef DIRECT
24 #include <hvx_hexagon_protos.h>
25 #else
26 #include <hexagon_protos.h>
27 #endif
28 #include <hexagon_types.h>
30 // expected-no-diagnostics
32 void test_hvx_protos(float a, unsigned int b) {
33 HVX_VectorPair c;
34 // CHECK-64: call <32 x i32> @llvm.hexagon.V6.v6mpyhubs10
35 // CHECK: call <64 x i32> @llvm.hexagon.V6.v6mpyhubs10.128B
36 c = Q6_Ww_v6mpy_WubWbI_h(c, c, 2);