================
@@ -0,0 +1,195 @@
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN:   dxil-pc-shadermodel6.3-library %s \
+// RUN:   -fnative-half-type -fnative-int16-type -emit-llvm -o - \
+// RUN:   | FileCheck %s --check-prefixes=CHECK,NATIVE_HALF
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN:   dxil-pc-shadermodel6.3-library %s -emit-llvm -o - \
+// RUN:   | FileCheck %s --check-prefixes=CHECK,NO_HALF
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN:   spirv-unknown-vulkan-library %s \
+// RUN:   -fnative-half-type -fnative-int16-type -emit-llvm -o - \
+// RUN:   | FileCheck %s --check-prefixes=CHECK,NATIVE_HALF
+// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \
+// RUN:   spirv-unknown-vulkan-library %s -emit-llvm -o - \
+// RUN:   | FileCheck %s --check-prefixes=CHECK,NO_HALF
----------------
kmpeng wrote:

(Same for `radians_mat.hlsl`)
We should only need the DXIL `-fnative-half-type` run line here, like 
`degrees.hlsl`. The SPIRV runs have identical codegen to DXIL since the 
`degrees` implementation was moved entirely into the header. `NO_HALF` runs are 
usually there to check for `.f16` vs `.f32` calls, but that difference doesn't 
exist anymore for the same reason. Running without `-fnative-half-type` here 
just promotes `half` -> `float` and emits the same `fmul` the float tests 
already cover.

https://github.com/llvm/llvm-project/pull/218573
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to