[llvm] [LLVM][Constants] Return ConstantFP(+0.0) as the null value for floating point types. (PR #200465)

via llvm-commits llvm-commits at lists.llvm.org
Fri May 29 11:00:56 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 174898 tests passed
* 3395 tests skipped
* 4 tests failed

## Failed Tests
(click on a test name to see its output)

### LLVM
<details>
<summary>LLVM.CodeGen/ARM/constants.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/ARM/constants.ll -mtriple=armv4t-unknown-linux-gnueabi -disable-cgp-branch-opts -verify-machineinstrs | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/ARM/constants.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=armv4t-unknown-linux-gnueabi -disable-cgp-branch-opts -verify-machineinstrs
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/ARM/constants.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/ARM/constants.ll:65:10: error: CHECK: expected string not found in input
# | ; CHECK: .zero 16
# |          ^
# | <stdin>:124:14: note: scanning from here
# |  .type const1,%object @ @const1
# |              ^
# | <stdin>:132:2: note: possible intended match here
# |  .zero 4
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/ARM/constants.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |           119: .Lfunc_end7: 
# |           120:  .size f8, .Lfunc_end7-f8 
# |           121:  .cantunwind 
# |           122:  .fnend 
# |           123:  @ -- End function 
# |           124:  .type const1,%object @ @const1 
# | check:65'0                  X~~~~~~~~~~~~~~~~~~ error: no match found
# |           125:  .data 
# | check:65'0     ~~~~~~~
# |           126:  .globl const1 
# | check:65'0     ~~~~~~~~~~~~~~~
# |           127:  .p2align 4, 0x0 
# | check:65'0     ~~~~~~~~~~~~~~~~~
# |           128: const1: 
# | check:65'0     ~~~~~~~~
# |           129:  .long 0x00000000 @ float 0 
# | check:65'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           130:  .long 0x00000000 @ float 0 
# | check:65'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           131:  .long 0x00000000 @ float 0 
# | check:65'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           132:  .zero 4 
# | check:65'0     ~~~~~~~~~
# | check:65'1      ?        possible intended match
# |           133:  .long 0x3f800000 @ float 1 
# | check:65'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           134:  .long 0x40000000 @ float 2 
# | check:65'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           135:  .long 0x40400000 @ float 3 
# | check:65'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           136:  .zero 4 
# | check:65'0     ~~~~~~~~~
# |           137:  .size const1, 32 
# | check:65'0     ~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>LLVM.CodeGen/SPIRV/hlsl-intrinsics/discard.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -verify-machineinstrs -O0 -mtriple=spirv1.5-unknown-vulkan /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/SPIRV/hlsl-intrinsics/discard.ll -o - | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/SPIRV/hlsl-intrinsics/discard.ll --check-prefixes=CHECK,SPIRV15
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -verify-machineinstrs -O0 -mtriple=spirv1.5-unknown-vulkan /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/SPIRV/hlsl-intrinsics/discard.ll -o -
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/SPIRV/hlsl-intrinsics/discard.ll --check-prefixes=CHECK,SPIRV15
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/SPIRV/hlsl-intrinsics/discard.ll:20:14: error: CHECK-DAG: expected string not found in input
# | ; CHECK-DAG: %[[#v4fzero:]] = OpConstantNull %[[#v4float]]
# |              ^
# | <stdin>:1:1: note: scanning from here
# |  OpCapability Shader
# | ^
# | <stdin>:1:1: note: with "v4float" equal to "12"
# |  OpCapability Shader
# | ^
# | <stdin>:21:2: note: possible intended match here
# |  %11 = OpConstant %7 0
# |  ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/SPIRV/hlsl-intrinsics/discard.ll:54:71: error: undefined variable: v4fzero
# | ; CHECK: %[[#cmplt:]] = OpFOrdLessThan %[[#v4bool]] %[[#loadvec]] %[[#v4fzero]]
# |                                                                       ^
# | <stdin>:39:31: note: with "v4bool" equal to "14"
# |  %19 = OpFunctionParameter %12
# |                               ^
# | <stdin>:39:31: note: with "loadvec" equal to "19"
# |  %19 = OpFunctionParameter %12
# |                               ^
# | <stdin>:41:2: note: possible intended match here
# |  %21 = OpFOrdLessThan %14 %19 %15
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/SPIRV/hlsl-intrinsics/discard.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             1:  OpCapability Shader 
# | dag:20'0       X~~~~~~~~~~~~~~~~~~~~ error: no match found
# | dag:20'1                             with "v4float" equal to "12"
# |             2:  OpCapability Linkage 
# | dag:20'0       ~~~~~~~~~~~~~~~~~~~~~~
# |             3:  OpMemoryModel Logical GLSL450 
# | dag:20'0       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             4:  OpSource Unknown 0 
# | dag:20'0       ~~~~~~~~~~~~~~~~~~~~
# |             5:  OpName %16 "Buf" 
# | dag:20'0       ~~~~~~~~~~~~~~~~~~
# |             6:  OpName %17 "test_scalar" 
# | dag:20'0       ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# |            16:  OpDecorate %20 LinkageAttributes "test_vector" Export 
# | dag:20'0       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            17:  %7 = OpTypeFloat 32 
# | dag:20'0       ~~~~~~~~~~~~~~~~~~~~~
# |            18:  %8 = OpTypeVoid 
# | dag:20'0       ~~~~~~~~~~~~~~~~~
# |            19:  %9 = OpTypeFunction %8 %7 
# | dag:20'0       ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            20:  %10 = OpTypeBool 
# | dag:20'0       ~~~~~~~~~~~~~~~~~~
# |            21:  %11 = OpConstant %7 0 
# | dag:20'0       ~~~~~~~~~~~~~~~~~~~~~~~
# | dag:20'2        ?                      possible intended match
# |            22:  %12 = OpTypeVector %7 4 
# | dag:20'0       ~~~~~~~~~~~~~~~~~~~~~~~~~
# |            23:  %13 = OpTypeFunction %8 %12 
# | dag:20'0       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            24:  %14 = OpTypeVector %10 4 
# | dag:20'0       ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            25:  %15 = OpConstantComposite %12 %11 %11 %11 %11 
# | dag:20'0       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            26:  %17 = OpFunction %8 None %9 ; -- Begin function test_scalar 
# | dag:20'0       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# |            34:  %3 = OpLabel 
# |            35:  OpReturn 
# |            36:  OpFunctionEnd 
# |            37:  ; -- End function 
# |            38:  %20 = OpFunction %8 None %13 ; -- Begin function test_vector 
# |            39:  %19 = OpFunctionParameter %12 
# | check:54'0                                   X error: match failed for invalid pattern
# | check:54'1                                     undefined variable: v4fzero
# | check:54'2                                     with "v4bool" equal to "14"
# | check:54'3                                     with "loadvec" equal to "19"
# |            40:  %4 = OpLabel 
# | check:54'0     ~~~~~~~~~~~~~~
# |            41:  %21 = OpFOrdLessThan %14 %19 %15 
# | check:54'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:54'4      ?                                 possible intended match
# |            42:  %22 = OpAny %10 %21 
# | check:54'0     ~~~~~~~~~~~~~~~~~~~~~
# |            43:  OpSelectionMerge %6 None 
# | check:54'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            44:  OpBranchConditional %22 %5 %6 
# | check:54'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            45:  %5 = OpLabel 
# | check:54'0     ~~~~~~~~~~~~~~
# |            46:  OpKill 
# | check:54'0     ~~~~~~~~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>LLVM.CodeGen/SPIRV/hlsl-resources/Gather.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -O0 -mtriple=spirv-vulkan1.3-compute /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/SPIRV/hlsl-resources/Gather.ll -o - | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --match-full-lines /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/SPIRV/hlsl-resources/Gather.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -O0 -mtriple=spirv-vulkan1.3-compute /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/SPIRV/hlsl-resources/Gather.ll -o -
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --match-full-lines /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/SPIRV/hlsl-resources/Gather.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/SPIRV/hlsl-resources/Gather.ll:16:14: error: CHECK-DAG: expected string not found in input
# | ; CHECK-DAG: %[[coord:[0-9]+]] = OpConstantNull %[[v2float]]
# |              ^
# | <stdin>:4:34: note: scanning from here
# |  OpCapability ImageGatherExtended
# |                                  ^
# | <stdin>:4:34: note: with "v2float" equal to "16"
# |  OpCapability ImageGatherExtended
# |                                  ^
# | <stdin>:65:2: note: possible intended match here
# |  %38 = OpConstantNull %8
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/SPIRV/hlsl-resources/Gather.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |           1:  OpCapability Shader 
# |           2:  OpCapability Int8 
# |           3:  OpCapability Linkage 
# |           4:  OpCapability ImageGatherExtended 
# | dag:16'0                                      X error: no match found
# | dag:16'1                                        with "v2float" equal to "16"
# |           5:  OpMemoryModel Logical GLSL450 
# | dag:16'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           6:  OpSource Unknown 0 
# | dag:16'0     ~~~~~~~~~~~~~~~~~~~~
# |           7:  OpName %56 "main" 
# | dag:16'0     ~~~~~~~~~~~~~~~~~~~
# |           8:  OpName %57 ".str" 
# | dag:16'0     ~~~~~~~~~~~~~~~~~~~
# |           9:  OpName %58 ".str.1" 
# | dag:16'0     ~~~~~~~~~~~~~~~~~~~~~
# |           .
# |           .
# |           .
# |          60:  %33 = OpConstant %11 105 
# | dag:16'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |          61:  %34 = OpConstantComposite %16 %24 %24 
# | dag:16'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |          62:  %35 = OpConstantComposite %8 %25 %25 
# | dag:16'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |          63:  %36 = OpConstantComposite %15 %33 %32 %31 %30 
# | dag:16'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |          64:  %37 = OpConstantComposite %13 %29 %28 %32 %27 %30 
# | dag:16'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |          65:  %38 = OpConstantNull %8 
# | dag:16'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
# | dag:16'2      ?                        possible intended match
# |          66:  %39 = OpVariable %20 UniformConstant  
# | dag:16'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |          67:  %40 = OpVariable %21 UniformConstant  
# | dag:16'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |          68:  %41 = OpTypeImage %5 Cube 0 0 0 1 Unknown  
# | dag:16'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |          69:  %42 = OpConstant %7 9 
# | dag:16'0     ~~~~~~~~~~~~~~~~~~~~~~~
# |          70:  %43 = OpTypeArray %11 %42 
# | dag:16'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           .
# |           .
# |           .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>LLVM.CodeGen/SPIRV/llvm-intrinsics/frexp.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/SPIRV/llvm-intrinsics/frexp.ll -o - | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/SPIRV/llvm-intrinsics/frexp.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/SPIRV/llvm-intrinsics/frexp.ll -o -
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/SPIRV/llvm-intrinsics/frexp.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/SPIRV/llvm-intrinsics/frexp.ll:12:14: error: CHECK-DAG: expected string not found in input
# | ; CHECK-DAG: %[[#vec2_null:]] = OpConstantNull %[[#vec2_float_type]]
# |              ^
# | <stdin>:1:1: note: scanning from here
# |  OpCapability Kernel
# | ^
# | <stdin>:1:1: note: with "vec2_float_type" equal to "7"
# |  OpCapability Kernel
# | ^
# | <stdin>:35:2: note: possible intended match here
# |  %11 = OpConstantNull %2
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/SPIRV/llvm-intrinsics/frexp.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |           1:  OpCapability Kernel 
# | dag:12'0     X~~~~~~~~~~~~~~~~~~~~ error: no match found
# | dag:12'1                           with "vec2_float_type" equal to "7"
# |           2:  OpCapability Addresses 
# | dag:12'0     ~~~~~~~~~~~~~~~~~~~~~~~~
# |           3:  OpCapability Linkage 
# | dag:12'0     ~~~~~~~~~~~~~~~~~~~~~~
# |           4:  OpCapability Float64 
# | dag:12'0     ~~~~~~~~~~~~~~~~~~~~~~
# |           5:  %1 = OpExtInstImport "OpenCL.std" 
# | dag:12'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           6:  OpMemoryModel Physical64 OpenCL 
# | dag:12'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           .
# |           .
# |           .
# |          30:  %6 = OpConstant %2 -0 
# | dag:12'0     ~~~~~~~~~~~~~~~~~~~~~~~
# |          31:  %7 = OpTypeVector %2 2 
# | dag:12'0     ~~~~~~~~~~~~~~~~~~~~~~~~
# |          32:  %8 = OpTypeFunction %7 
# | dag:12'0     ~~~~~~~~~~~~~~~~~~~~~~~~
# |          33:  %9 = OpTypeVector %3 2 
# | dag:12'0     ~~~~~~~~~~~~~~~~~~~~~~~~
# |          34:  %10 = OpTypePointer Function %9 
# | dag:12'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |          35:  %11 = OpConstantNull %2 
# | dag:12'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
# | dag:12'2      ?                        possible intended match
# |          36:  %12 = OpConstantComposite %7 %11 %11 
# | dag:12'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |          37:  %13 = OpConstantComposite %7 %11 %6 
# | dag:12'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |          38:  %14 = OpTypeVector %2 4 
# | dag:12'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
# |          39:  %15 = OpTypeFunction %14 
# | dag:12'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |          40:  %16 = OpTypeVector %3 4 
# | dag:12'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/200465


More information about the llvm-commits mailing list