[clang] [HLSL] Fix casting asserts (PR #82827)
Chris B via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 23 14:09:09 PST 2024
================
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -triple dxil-unknown-shadermodel6.6-library -S -fnative-half-type -finclude-default-header -o - -ast-dump %s | FileCheck %s
+// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm -disable-llvm-passes -O3 -o - | FileCheck %s --check-prefixes=CHECKIR
----------------
llvm-beanz wrote:
nit: simplifying the `RUN` line. HLSL 2021 is the default version, but ideally tests that don't depend on a specific language version shouldn't specify a version, also `-x hlsl` is inferred from the filename. Also you passed both `-disable-llvm-passes` and `-O3` which directly contradict each other.
```suggestion
// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm -disable-llvm-passes -o - | FileCheck %s --check-prefixes=CHECKIR
```
https://github.com/llvm/llvm-project/pull/82827
More information about the cfe-commits
mailing list