1 // RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
2 // RUN: dxil-pc-shadermodel6.3-library %s -D__HLSL_ENABLE_16_BIT \
3 // RUN: -emit-llvm -disable-llvm-passes -O3 -o - | FileCheck %s
5 // FIXME: add test for char/int8_t/uint8_t when these types are supported in HLSL.
6 // See https://github.com/llvm/llvm-project/issues/58453.
8 // Make sure generate i16 add.
9 // CHECK: add nsw i16 %
10 int16_t add(int16_t a, int16_t b) {
13 // CHECK: define noundef <2 x i16> @
14 // CHECK: add <2 x i16>
15 int16_t2 add(int16_t2 a, int16_t2 b) {
18 // CHECK: define noundef <3 x i16> @
19 // CHECK: add <3 x i16>
20 int16_t3 add(int16_t3 a, int16_t3 b) {
23 // CHECK: define noundef <4 x i16> @
24 // CHECK: add <4 x i16>
25 int16_t4 add(int16_t4 a, int16_t4 b) {
28 // CHECK: define noundef i16 @
30 uint16_t add(uint16_t a, uint16_t b) {
33 // CHECK: define noundef <2 x i16> @
34 // CHECK: add <2 x i16>
35 uint16_t2 add(uint16_t2 a, uint16_t2 b) {
38 // CHECK: define noundef <3 x i16> @
39 // CHECK: add <3 x i16>
40 uint16_t3 add(uint16_t3 a, uint16_t3 b) {
43 // CHECK: define noundef <4 x i16> @
44 // CHECK: add <4 x i16>
45 uint16_t4 add(uint16_t4 a, uint16_t4 b) {