[clang] [llvm] [HLSL][DirectX] Emit convergence control tokens when targeting DirectX (PR #188792)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 16 09:59:31 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 133663 tests passed
* 3115 tests skipped
* 2 tests failed
## Failed Tests
(click on a test name to see its output)
### Clang
<details>
<summary>Clang.CodeGenHLSL/BasicFeatures/InitLists.hlsl</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -triple dxil-pc-shadermodel6.0-library -disable-llvm-passes -emit-llvm -finclude-default-header -o - C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\BasicFeatures\InitLists.hlsl | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\BasicFeatures\InitLists.hlsl
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\23\include' -nostdsysteminc -triple dxil-pc-shadermodel6.0-library -disable-llvm-passes -emit-llvm -finclude-default-header -o - 'C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\BasicFeatures\InitLists.hlsl'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\BasicFeatures\InitLists.hlsl:107:20: warning: implicit conversion from 'int' to 'float' may lose precision [-Wimplicit-int-float-conversion]
# | 107 | TwoFloats TF3 = {Val, 2};
# | | ~^~~
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\BasicFeatures\InitLists.hlsl:132:20: warning: implicit conversion from 'int' to 'float' may lose precision [-Wimplicit-int-float-conversion]
# | 132 | TwoFloats TF4 = {TwoVals};
# | | ~^~~~~~~
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\BasicFeatures\InitLists.hlsl:132:20: warning: implicit conversion from 'int' to 'float' may lose precision [-Wimplicit-int-float-conversion]
# | 132 | TwoFloats TF4 = {TwoVals};
# | | ~^~~~~~~
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\BasicFeatures\InitLists.hlsl:177:18: warning: implicit conversion turns floating-point number into integer: 'float' to 'int' [-Wfloat-conversion]
# | 177 | TwoInts TI2 = {TF4};
# | | ~^~~
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\BasicFeatures\InitLists.hlsl:177:18: warning: implicit conversion turns floating-point number into integer: 'float' to 'int' [-Wfloat-conversion]
# | 177 | TwoInts TI2 = {TF4};
# | | ~^~~
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\BasicFeatures\InitLists.hlsl:242:31: warning: implicit conversion from 'int' to 'float' may lose precision [-Wimplicit-int-float-conversion]
# | 242 | Doggo D1 = {TI1, TI2, {Val, Val}, {{TF1, TF2}, {TF3, TF4}}};
# | | ~ ^~~
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\BasicFeatures\InitLists.hlsl:328:20: warning: implicit conversion turns floating-point number into integer: 'float' to 'long' [-Wfloat-conversion]
# | 328 | AnimalBits A1 = {D1};
# | | ~^~
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\BasicFeatures\InitLists.hlsl:328:20: warning: implicit conversion changes signedness: 'int' to 'unsigned int' [-Wsign-conversion]
# | 328 | AnimalBits A1 = {D1};
# | | ~^~
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\BasicFeatures\InitLists.hlsl:747:33: warning: implicit conversion from 'int64_t' (aka 'long') to 'float' may lose precision [-Wimplicit-int-float-conversion]
# | 747 | Zoo Z1 = {D1, A1, D1, A1, D1, A1};
# | | ^~
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\BasicFeatures\InitLists.hlsl:747:33: warning: implicit conversion changes signedness: 'uint' (aka 'unsigned int') to 'int' [-Wsign-conversion]
# | 747 | Zoo Z1 = {D1, A1, D1, A1, D1, A1};
# | | ^~
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\BasicFeatures\InitLists.hlsl:747:25: warning: implicit conversion from 'int64_t' (aka 'long') to 'float' may lose precision [-Wimplicit-int-float-conversion]
# | 747 | Zoo Z1 = {D1, A1, D1, A1, D1, A1};
# | | ^~
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\BasicFeatures\InitLists.hlsl:747:25: warning: implicit conversion changes signedness: 'uint' (aka 'unsigned int') to 'int' [-Wsign-conversion]
# | 747 | Zoo Z1 = {D1, A1, D1, A1, D1, A1};
# | | ^~
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\BasicFeatures\InitLists.hlsl:747:17: warning: implicit conversion from 'int64_t' (aka 'long') to 'float' may lose precision [-Wimplicit-int-float-conversion]
# | 747 | Zoo Z1 = {D1, A1, D1, A1, D1, A1};
# | | ^~
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\BasicFeatures\InitLists.hlsl:747:17: warning: implicit conversion changes signedness: 'uint' (aka 'unsigned int') to 'int' [-Wsign-conversion]
# | 747 | Zoo Z1 = {D1, A1, D1, A1, D1, A1};
# | | ^~
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\BasicFeatures\InitLists.hlsl:1154:21: warning: implicit conversion from 'int' to 'float' may lose precision [-Wimplicit-int-float-conversion]
# | 1154 | float4 F = float4(TI, 1, 2);
# | | ^~
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\BasicFeatures\InitLists.hlsl:1154:21: warning: implicit conversion from 'int' to 'float' may lose precision [-Wimplicit-int-float-conversion]
# | 1154 | float4 F = float4(TI, 1, 2);
# | | ^~
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\BasicFeatures\InitLists.hlsl:1155:25: warning: implicit conversion from 'int' to 'float' may lose precision [-Wimplicit-int-float-conversion]
# | 1155 | float3 F2 = float3(3, TI);
# | | ~ ^~
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\BasicFeatures\InitLists.hlsl:1155:25: warning: implicit conversion from 'int' to 'float' may lose precision [-Wimplicit-int-float-conversion]
# | 1155 | float3 F2 = float3(3, TI);
# | | ~ ^~
# | 18 warnings generated.
# `-----------------------------
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\BasicFeatures\InitLists.hlsl'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\BasicFeatures\InitLists.hlsl:1184:16: error: CHECK-NEXT: is not on the line after the previous match
# | // CHECK-NEXT: [[TI:%.*]] = alloca [[STRUCT_TWOINTS:%.*]], align 1
# | ^
# | <stdin>:1009:2: note: 'next' match was here
# | %TI = alloca %struct.TwoInts, align 1
# | ^
# | <stdin>:1007:7: note: previous match ended here
# | entry:
# | ^
# | <stdin>:1008:1: note: non-matching line after previous match is here
# | %0 = call token @llvm.experimental.convergence.entry()
# | ^
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\BasicFeatures\InitLists.hlsl:1228:16: error: CHECK-NEXT: is not on the line after the previous match
# | // CHECK-NEXT: [[INTS:%.*]] = alloca [2 x i32], align 4
# | ^
# | <stdin>:1051:2: note: 'next' match was here
# | %Ints = alloca [2 x i32], align 4
# | ^
# | <stdin>:1049:7: note: previous match ended here
# | entry:
# | ^
# | <stdin>:1050:1: note: non-matching line after previous match is here
# | %0 = call token @llvm.experimental.convergence.entry()
# | ^
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\BasicFeatures\InitLists.hlsl:1275:16: error: CHECK-NEXT: is not on the line after the previous match
# | // CHECK-NEXT: [[ARR:%.*]] = alloca [4 x float], align 4
# | ^
# | <stdin>:1096:2: note: 'next' match was here
# | %Arr = alloca [4 x float], align 4
# | ^
# | <stdin>:1094:7: note: previous match ended here
# | entry:
# | ^
# | <stdin>:1095:1: note: non-matching line after previous match is here
# | %0 = call token @llvm.experimental.convergence.entry()
# | ^
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\BasicFeatures\InitLists.hlsl:1326:16: error: CHECK-NEXT: is not on the line after the previous match
# | // CHECK-NEXT: [[F:%.*]] = alloca float, align 4
# | ^
# | <stdin>:1144:2: note: 'next' match was here
# | %F = alloca float, align 4
# | ^
# | <stdin>:1142:7: note: previous match ended here
# | entry:
# | ^
# | <stdin>:1143:1: note: non-matching line after previous match is here
# | %0 = call token @llvm.experimental.convergence.entry()
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\BasicFeatures\InitLists.hlsl
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 1004:
# | 1005: ; Function Attrs: alwaysinline convergent mustprogress norecurse nounwind
# | 1006: define hidden void @_Z6case289TwoFloats(ptr noundef byval(%struct.TwoFloats) align 1 %TF) #0 {
# | 1007: entry:
# | 1008: %0 = call token @llvm.experimental.convergence.entry()
# | 1009: %TI = alloca %struct.TwoInts, align 1
# | next:1184 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: match on wrong line
# | 1010: %ref.tmp = alloca %struct.TwoInts, align 1
# | 1011: %agg-temp = alloca %struct.TwoFloats, align 1
# | 1012: %ref.tmp6 = alloca %struct.TwoInts, align 1
# | 1013: %agg-temp7 = alloca %struct.TwoFloats, align 1
# | 1014: %Z = getelementptr inbounds nuw %struct.TwoInts, ptr %TI, i32 0, i32 0
# | .
# | .
# | .
# | 1046:
# | 1047: ; Function Attrs: alwaysinline convergent mustprogress norecurse nounwind
# | 1048: define hidden void @_Z6case2910FourFloats(ptr noundef byval(%struct.FourFloats) align 1 %FF) #0 {
# | 1049: entry:
# | 1050: %0 = call token @llvm.experimental.convergence.entry()
# | 1051: %Ints = alloca [2 x i32], align 4
# | next:1228 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: match on wrong line
# | 1052: %ref.tmp = alloca [2 x i32], align 4
# | 1053: %agg-temp = alloca %struct.FourFloats, align 1
# | 1054: %ref.tmp7 = alloca [2 x i32], align 4
# | 1055: %agg-temp8 = alloca %struct.FourFloats, align 1
# | 1056: call void @llvm.memcpy.p0.p0.i32(ptr align 1 %agg-temp, ptr align 1 %FF, i32 16, i1 false)
# | .
# | .
# | .
# | 1091:
# | 1092: ; Function Attrs: alwaysinline convergent mustprogress norecurse nounwind
# | 1093: define hidden void @_Z6case30v() #0 {
# | 1094: entry:
# | 1095: %0 = call token @llvm.experimental.convergence.entry()
# | 1096: %Arr = alloca [4 x float], align 4
# | next:1275 !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: match on wrong line
# | 1097: %TI = alloca %struct.TwoInts, align 1
# | 1098: %ref.tmp = alloca %struct.TwoInts, align 1
# | 1099: %agg-temp = alloca [4 x float], align 4
# | 1100: %ref.tmp8 = alloca %struct.TwoInts, align 1
# | 1101: %agg-temp9 = alloca [4 x float], align 4
# | .
# | .
# | .
# | 1139:
# | 1140: ; Function Attrs: alwaysinline convergent mustprogress norecurse nounwind
# | 1141: define hidden void @_Z6case31v() #0 {
# | 1142: entry:
# | 1143: %0 = call token @llvm.experimental.convergence.entry()
# | 1144: %F = alloca float, align 4
# | next:1326 !~~~~~~~~~~~~~~~~~~~~~~~~~ error: match on wrong line
# | 1145: %SB = alloca %struct.SlicyBits, align 1
# | 1146: store float 1.000000e+00, ptr %F, align 4
# | 1147: %1 = load float, ptr %F, align 4
# | 1148: %conv = fptosi float %1 to i32
# | 1149: %2 = trunc i32 %conv to i8
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Clang.CodeGenHLSL/resources/Texture2D-Mips.hlsl</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -triple dxil-pc-shadermodel6.0-pixel -x hlsl -emit-llvm -disable-llvm-passes -finclude-default-header -o - C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\Texture2D-Mips.hlsl | llvm-cxxfilt | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\Texture2D-Mips.hlsl --check-prefixes=CHECK,DXIL
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\23\include' -nostdsysteminc -triple dxil-pc-shadermodel6.0-pixel -x hlsl -emit-llvm -disable-llvm-passes -finclude-default-header -o - 'C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\Texture2D-Mips.hlsl'
# note: command had no output on stdout or stderr
# executed command: llvm-cxxfilt
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\Texture2D-Mips.hlsl' --check-prefixes=CHECK,DXIL
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\Texture2D-Mips.hlsl:5:11: error: CHECK: expected string not found in input
# | // CHECK: define internal {{.*}} <4 x float> @test_mips(float vector[2])(<2 x float> {{.*}} %loc) #1 {
# | ^
# | <stdin>:1:1: note: scanning from here
# | ; ModuleID = 'C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\Texture2D-Mips.hlsl'
# | ^
# | <stdin>:60:20: note: possible intended match here
# | define internal noundef nofpclass(nan inf) <4 x float> @test_mips(float vector[2])(<2 x float> noundef nofpclass(nan inf) %loc) #2 {
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\Texture2D-Mips.hlsl
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: ; ModuleID = 'C:\_work\llvm-project\llvm-project\clang\test\CodeGenHLSL\resources\Texture2D-Mips.hlsl'
# | check:5'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# | 2: source_filename = "C:\\_work\\llvm-project\\llvm-project\\clang\\test\\CodeGenHLSL\\resources\\Texture2D-Mips.hlsl"
# | check:5'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 3: target datalayout = "e-m:e-ve-p:32:32-i1:32-i8:8-i16:16-i32:32-i64:64-f16:16-f32:32-f64:64-n8:16:32:64"
# | check:5'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 4: target triple = "dxilv1.0-pc-shadermodel6.0-pixel"
# | check:5'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 5:
# | check:5'0 ~
# | 6: %"class.hlsl::Texture2D" = type { target("dx.Texture", <4 x float>, 0, 0, 0, 2), %"struct.hlsl::Texture2D<>::mips_type" }
# | check:5'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | 55: call void @hlsl::Texture2D<float vector[4]>::Texture2D(hlsl::Texture2D<float vector[4]> const&)(ptr noundef nonnull align 4 dereferenceable(8) %agg.result, ptr noundef nonnull align 4 dereferenceable(8) %tmp) #7 [ "convergencectrl"(token %0) ]
# | check:5'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 56: ret void
# | check:5'0 ~~~~~~~~~~
# | 57: }
# | check:5'0 ~~
# | 58:
# | check:5'0 ~
# | 59: ; Function Attrs: alwaysinline convergent mustprogress norecurse nounwind
# | check:5'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 60: define internal noundef nofpclass(nan inf) <4 x float> @test_mips(float vector[2])(<2 x float> noundef nofpclass(nan inf) %loc) #2 {
# | check:5'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:5'1 ? possible intended match
# | 61: entry:
# | check:5'0 ~~~~~~~
# | 62: %0 = call token @llvm.experimental.convergence.entry()
# | check:5'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 63: %loc.addr = alloca <2 x float>, align 4
# | check:5'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 64: %ref.tmp = alloca %"struct.hlsl::Texture2D<>::mips_slice_type", align 4
# | check:5'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 65: store <2 x float> %loc, ptr %loc.addr, align 4
# | check:5'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.
https://github.com/llvm/llvm-project/pull/188792
More information about the cfe-commits
mailing list