llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[llvm-tblgen] error GB5ECA9C8: Type set is empty for each HW mode in 'V_CMP_F_F32_e64'

Open SevenIsSeven opened this issue 1 year ago • 10 comments

192>D:/my/imported/llpc/imported/llvm-project/llvm/lib/Target/AMDGPU\VOPCInstructions.td(404,7): error GB5ECA9C8: Type set is empty for each HW mode in 'V_CMP_F_F32_e64'
192>  def _e64 : VOP3_Pseudo<opName, P, getVOPCPat64<cond, P>.ret, /*IsVOP3P*/false, P.HasOpSel>,
192>      ^
192>Included from D:/my/imported/llpc/imported/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUGISel.td:13:
192>Included from D:/my/imported/llpc/imported/llvm-project/llvm/lib/Target/AMDGPU\AMDGPU.td:3204:
192>Included from D:/my/imported/llpc/imported/llvm-project/llvm/lib/Target/AMDGPU\SIInstrInfo.td:3859:
192>Included from D:/my/imported/llpc/imported/llvm-project/llvm/lib/Target/AMDGPU\SIInstructions.td:29:
192>Included from D:/my/imported/llpc/imported/llvm-project/llvm/lib/Target/AMDGPU\VOPInstructions.td:2482:
192>D:/my/imported/llpc/imported/llvm-project/llvm/lib/Target/AMDGPU\VOPCInstructions.td:630:20: note: instantiated from multiclass
192>defm V_CMP_F_F32 : VOPC_F32 <"v_cmp_f_f32">;
192>                   ^
192>PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
192>Stack dump:
192>0.	Program arguments: ..\\..\\..\\NATIVE\\Release\\bin\\llvm-tblgen.exe -gen-global-isel -I D:/my/imported/llpc/imported/llvm-project/llvm/lib/Target/AMDGPU -ID:/my/my_build/imported/llvm/include -ID:/my/imported/llpc/imported/llvm-project/llvm/include -DLLPC_BUILD_NPI -I D:/my/imported/llpc/imported/llvm-project/llvm/lib/Target --long-string-literals=0 D:/my/imported/llpc/imported/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUGISel.td -o D:/my/my_build/imported/llvm/lib/Target/AMDGPU/AMDGPUGenGlobalISel.inc
192>The system cannot find the batch label specified - VCEnd
192>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(237,5): error MSB8066: Custom build for 'd:\my\my_build\CMakeFiles\fb4144b3a45a13daeee1d58b37aa986d\AMDGPUGenGlobalISel.inc.rule' exited with code 1.
192>Included from D:/my/imported/llpc/imported/llvm-project/llvm/lib/Target/AMDGPU/AMDGPU.td:3204:
192>Included from D:/my/imported/llpc/imported/llvm-project/llvm/lib/Target/AMDGPU\SIInstrInfo.td:3859:
192>Included from D:/my/imported/llpc/imported/llvm-project/llvm/lib/Target/AMDGPU\SIInstructions.td:29:
192>Included from D:/my/imported/llpc/imported/llvm-project/llvm/lib/Target/AMDGPU\VOPInstructions.td:2482:

SevenIsSeven avatar Apr 30 '25 04:04 SevenIsSeven

it's related to LLVM_OPTIMIZED_TABLEGEN. Commenting LLVM_OPTIMIZED_TABLEGEN would pass so it looks the optimized llvm-tblgen.exe has something missing.

SevenIsSeven avatar Apr 30 '25 06:04 SevenIsSeven

@llvm/issue-subscribers-backend-amdgpu

Author: None (SevenIsSeven)

``` 192>D:/my/imported/llpc/imported/llvm-project/llvm/lib/Target/AMDGPU\VOPCInstructions.td(404,7): error GB5ECA9C8: Type set is empty for each HW mode in 'V_CMP_F_F32_e64' 192> def _e64 : VOP3_Pseudo<opName, P, getVOPCPat64<cond, P>.ret, /*IsVOP3P*/false, P.HasOpSel>, 192> ^ 192>Included from D:/my/imported/llpc/imported/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUGISel.td:13: 192>Included from D:/my/imported/llpc/imported/llvm-project/llvm/lib/Target/AMDGPU\AMDGPU.td:3204: 192>Included from D:/my/imported/llpc/imported/llvm-project/llvm/lib/Target/AMDGPU\SIInstrInfo.td:3859: 192>Included from D:/my/imported/llpc/imported/llvm-project/llvm/lib/Target/AMDGPU\SIInstructions.td:29: 192>Included from D:/my/imported/llpc/imported/llvm-project/llvm/lib/Target/AMDGPU\VOPInstructions.td:2482: 192>D:/my/imported/llpc/imported/llvm-project/llvm/lib/Target/AMDGPU\VOPCInstructions.td:630:20: note: instantiated from multiclass 192>defm V_CMP_F_F32 : VOPC_F32 <"v_cmp_f_f32">; 192> ^ 192>PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace. 192>Stack dump: 192>0. Program arguments: ..\\..\\..\\NATIVE\\Release\\bin\\llvm-tblgen.exe -gen-global-isel -I D:/my/imported/llpc/imported/llvm-project/llvm/lib/Target/AMDGPU -ID:/my/my_build/imported/llvm/include -ID:/my/imported/llpc/imported/llvm-project/llvm/include -DLLPC_BUILD_NPI -I D:/my/imported/llpc/imported/llvm-project/llvm/lib/Target --long-string-literals=0 D:/my/imported/llpc/imported/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUGISel.td -o D:/my/my_build/imported/llvm/lib/Target/AMDGPU/AMDGPUGenGlobalISel.inc 192>The system cannot find the batch label specified - VCEnd 192>C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(237,5): error MSB8066: Custom build for 'd:\my\my_build\CMakeFiles\fb4144b3a45a13daeee1d58b37aa986d\AMDGPUGenGlobalISel.inc.rule' exited with code 1. 192>Included from D:/my/imported/llpc/imported/llvm-project/llvm/lib/Target/AMDGPU/AMDGPU.td:3204: 192>Included from D:/my/imported/llpc/imported/llvm-project/llvm/lib/Target/AMDGPU\SIInstrInfo.td:3859: 192>Included from D:/my/imported/llpc/imported/llvm-project/llvm/lib/Target/AMDGPU\SIInstructions.td:29: 192>Included from D:/my/imported/llpc/imported/llvm-project/llvm/lib/Target/AMDGPU\VOPInstructions.td:2482: ```

llvmbot avatar Apr 30 '25 10:04 llvmbot

Maybe related to 2bc6f9d4b6ff1d838f1c2d50cacbab6ba2f20bc9?

arsenm avatar Apr 30 '25 10:04 arsenm

Maybe related to 2bc6f9d?

I think we've ruled that one out - we observed the issue using a commit prior to that one going in. Still trying to narrow it down.

dstutt avatar Apr 30 '25 13:04 dstutt

This is caused by a downstream modification to TableGen which is activated by a compiler define. The define is not passed when building native tablegen via CrossCompile (on Windows), so table generation fails.

perlfu avatar May 01 '25 00:05 perlfu

https://github.com/llvm/llvm-project/pull/138086

perlfu avatar May 01 '25 05:05 perlfu

This problem is specific to an internal AMD build which modified LLVM_TABLEGEN_FLAGS. This causes issues when using the native tablegen (cross-compiled, for debug builds and optmized llvm option is used).

https://github.com/llvm/llvm-project/pull/138086 should fix it.

dstutt avatar May 01 '25 08:05 dstutt

Sorry @perlfu didn't see you had already commented.

This is also an issue for Linux builds.

dstutt avatar May 01 '25 08:05 dstutt

@SevenIsSeven - I think we can close this?

perlfu avatar May 06 '25 03:05 perlfu

Thank you guys for the prompt fix.

SevenIsSeven avatar May 06 '25 23:05 SevenIsSeven