[flang-commits] [flang] [flang] Fold x + 0, 0 + x and x - 0 for INTEGER and UNSIGNED (PR #192479)

LLVM Continuous Integration via flang-commits flang-commits at lists.llvm.org
Fri Apr 17 09:08:47 PDT 2026


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `openmp-offload-amdgpu-clang-flang` running on `rocm-worker-hw-01` while building `flang` at step 3 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/67/builds/2637

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 3 (annotate) failure: 'python ../llvm.src/offload/ci/openmp-offload-amdgpu-clang-flang.py ...' (failure)
...
PASS: libomptarget :: x86_64-unknown-linux-gnu :: mapping/declare_mapper_nested_default_mappers_complex_structure.cpp (895 of 1325)
PASS: libomptarget :: x86_64-unknown-linux-gnu :: mapping/declare_mapper_target.cpp (896 of 1325)
PASS: libomptarget :: x86_64-unknown-linux-gnu :: mapping/declare_mapper_target_data_enter_exit.cpp (897 of 1325)
PASS: libomptarget :: x86_64-unknown-linux-gnu :: mapping/declare_mapper_target_data.cpp (898 of 1325)
PASS: libomptarget :: x86_64-unknown-linux-gnu :: mapping/duplicate_mappings_2.cpp (899 of 1325)
PASS: libomptarget :: x86_64-unknown-linux-gnu :: mapping/declare_mapper_target_update.cpp (900 of 1325)
PASS: libomptarget :: x86_64-unknown-linux-gnu :: mapping/declare_mapper_api.cpp (901 of 1325)
PASS: libomptarget :: x86_64-unknown-linux-gnu :: mapping/implicit_device_ptr.c (902 of 1325)
PASS: libomptarget :: amdgcn-amd-amdhsa :: offloading/taskloop_offload_nowait.cpp (903 of 1325)
PASS: libomptarget :: x86_64-unknown-linux-gnu :: mapping/firstprivate_aligned.cpp (904 of 1325)
FAIL: libomptarget :: amdgcn-amd-amdhsa :: tools/omp-kernel-replay/record-replay-advanced.cpp (905 of 1325)
******************** TEST 'libomptarget :: amdgcn-amd-amdhsa :: tools/omp-kernel-replay/record-replay-advanced.cpp' FAILED ********************
Exit Code: 123

Command Output (stdout):
--
# RUN: at line 2
/home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/./bin/clang++ -fopenmp    -I /home/botworker/builds/openmp-offload-amdgpu-clang-flang/llvm.src/offload/test -I /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -L /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload -L /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/./lib -L /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/./lib -L /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/openmp/runtime/src  -Wl,-rpath,/home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload -Wl,-rpath,/home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -Wl,-rpath,/home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/./lib -Wl,-rpath,/home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/./lib  -fopenmp-targets=amdgcn-amd-amdhsa /home/botworker/builds/openmp-offload-amdgpu-clang-flang/llvm.src/offload/test/tools/omp-kernel-replay/record-replay-advanced.cpp -o /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/tools/omp-kernel-replay/Output/record-replay-advanced.cpp.tmp -Xoffload-linker -lompdevice
# executed command: /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/./bin/clang++ -fopenmp -I /home/botworker/builds/openmp-offload-amdgpu-clang-flang/llvm.src/offload/test -I /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -L /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload -L /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/./lib -L /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/./lib -L /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -Wl,-rpath,/home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload -Wl,-rpath,/home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -Wl,-rpath,/home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/./lib -Wl,-rpath,/home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/./lib -fopenmp-targets=amdgcn-amd-amdhsa /home/botworker/builds/openmp-offload-amdgpu-clang-flang/llvm.src/offload/test/tools/omp-kernel-replay/record-replay-advanced.cpp -o /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/tools/omp-kernel-replay/Output/record-replay-advanced.cpp.tmp -Xoffload-linker -lompdevice
# note: command had no output on stdout or stderr
# RUN: at line 3
rm -rf /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/tools/omp-kernel-replay/Output/record-replay-advanced.cpp.tmp.testdir
# executed command: rm -rf /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/tools/omp-kernel-replay/Output/record-replay-advanced.cpp.tmp.testdir
# note: command had no output on stdout or stderr
# RUN: at line 4
mkdir -p /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/tools/omp-kernel-replay/Output/record-replay-advanced.cpp.tmp.testdir
# executed command: mkdir -p /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/tools/omp-kernel-replay/Output/record-replay-advanced.cpp.tmp.testdir
# note: command had no output on stdout or stderr
# RUN: at line 5
env LIBOMPTARGET_RECORD=1 LIBOMPTARGET_RECORD_MEMSIZE=536870912 LIBOMPTARGET_RECORD_DIR=/home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/tools/omp-kernel-replay/Output/record-replay-advanced.cpp.tmp.testdir /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/tools/omp-kernel-replay/Output/record-replay-advanced.cpp.tmp 2>&1 | /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/./bin/FileCheck /home/botworker/builds/openmp-offload-amdgpu-clang-flang/llvm.src/offload/test/tools/omp-kernel-replay/record-replay-advanced.cpp
# executed command: env LIBOMPTARGET_RECORD=1 LIBOMPTARGET_RECORD_MEMSIZE=536870912 LIBOMPTARGET_RECORD_DIR=/home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/tools/omp-kernel-replay/Output/record-replay-advanced.cpp.tmp.testdir /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/tools/omp-kernel-replay/Output/record-replay-advanced.cpp.tmp
# note: command had no output on stdout or stderr
# executed command: /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/./bin/FileCheck /home/botworker/builds/openmp-offload-amdgpu-clang-flang/llvm.src/offload/test/tools/omp-kernel-replay/record-replay-advanced.cpp
# note: command had no output on stdout or stderr
# RUN: at line 6
ls -t /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/tools/omp-kernel-replay/Output/record-replay-advanced.cpp.tmp.testdir/*.json | sed -n '1p' | grep . | xargs -I {} /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/./bin/llvm-omp-kernel-replay --verify {}
# executed command: ls -t '/home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/tools/omp-kernel-replay/Output/record-replay-advanced.cpp.tmp.testdir/*.json'
# note: command had no output on stdout or stderr
# executed command: sed -n 1p
# note: command had no output on stdout or stderr
# executed command: grep .
# note: command had no output on stdout or stderr
# executed command: xargs -I '{}' /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/./bin/llvm-omp-kernel-replay --verify '{}'
# .---command stdout------------
# | [llvm-omp-kernel-replay] Replay device memory verified!
# `-----------------------------
# RUN: at line 7
ls -t /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/tools/omp-kernel-replay/Output/record-replay-advanced.cpp.tmp.testdir/*.json | sed -n '2p' | grep . | xargs -I {} /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/./bin/llvm-omp-kernel-replay --verify {}
# executed command: ls -t '/home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/tools/omp-kernel-replay/Output/record-replay-advanced.cpp.tmp.testdir/*.json'
Step 9 (Add check check-offload) failure: Add check check-offload (failure)
...
PASS: libomptarget :: x86_64-unknown-linux-gnu :: mapping/declare_mapper_nested_default_mappers_complex_structure.cpp (895 of 1325)
PASS: libomptarget :: x86_64-unknown-linux-gnu :: mapping/declare_mapper_target.cpp (896 of 1325)
PASS: libomptarget :: x86_64-unknown-linux-gnu :: mapping/declare_mapper_target_data_enter_exit.cpp (897 of 1325)
PASS: libomptarget :: x86_64-unknown-linux-gnu :: mapping/declare_mapper_target_data.cpp (898 of 1325)
PASS: libomptarget :: x86_64-unknown-linux-gnu :: mapping/duplicate_mappings_2.cpp (899 of 1325)
PASS: libomptarget :: x86_64-unknown-linux-gnu :: mapping/declare_mapper_target_update.cpp (900 of 1325)
PASS: libomptarget :: x86_64-unknown-linux-gnu :: mapping/declare_mapper_api.cpp (901 of 1325)
PASS: libomptarget :: x86_64-unknown-linux-gnu :: mapping/implicit_device_ptr.c (902 of 1325)
PASS: libomptarget :: amdgcn-amd-amdhsa :: offloading/taskloop_offload_nowait.cpp (903 of 1325)
PASS: libomptarget :: x86_64-unknown-linux-gnu :: mapping/firstprivate_aligned.cpp (904 of 1325)
FAIL: libomptarget :: amdgcn-amd-amdhsa :: tools/omp-kernel-replay/record-replay-advanced.cpp (905 of 1325)
******************** TEST 'libomptarget :: amdgcn-amd-amdhsa :: tools/omp-kernel-replay/record-replay-advanced.cpp' FAILED ********************
Exit Code: 123

Command Output (stdout):
--
# RUN: at line 2
/home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/./bin/clang++ -fopenmp    -I /home/botworker/builds/openmp-offload-amdgpu-clang-flang/llvm.src/offload/test -I /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -L /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload -L /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/./lib -L /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/./lib -L /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/openmp/runtime/src  -Wl,-rpath,/home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload -Wl,-rpath,/home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -Wl,-rpath,/home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/./lib -Wl,-rpath,/home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/./lib  -fopenmp-targets=amdgcn-amd-amdhsa /home/botworker/builds/openmp-offload-amdgpu-clang-flang/llvm.src/offload/test/tools/omp-kernel-replay/record-replay-advanced.cpp -o /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/tools/omp-kernel-replay/Output/record-replay-advanced.cpp.tmp -Xoffload-linker -lompdevice
# executed command: /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/./bin/clang++ -fopenmp -I /home/botworker/builds/openmp-offload-amdgpu-clang-flang/llvm.src/offload/test -I /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -L /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload -L /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/./lib -L /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/./lib -L /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -Wl,-rpath,/home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload -Wl,-rpath,/home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/openmp/runtime/src -Wl,-rpath,/home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/./lib -Wl,-rpath,/home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/./lib -fopenmp-targets=amdgcn-amd-amdhsa /home/botworker/builds/openmp-offload-amdgpu-clang-flang/llvm.src/offload/test/tools/omp-kernel-replay/record-replay-advanced.cpp -o /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/tools/omp-kernel-replay/Output/record-replay-advanced.cpp.tmp -Xoffload-linker -lompdevice
# note: command had no output on stdout or stderr
# RUN: at line 3
rm -rf /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/tools/omp-kernel-replay/Output/record-replay-advanced.cpp.tmp.testdir
# executed command: rm -rf /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/tools/omp-kernel-replay/Output/record-replay-advanced.cpp.tmp.testdir
# note: command had no output on stdout or stderr
# RUN: at line 4
mkdir -p /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/tools/omp-kernel-replay/Output/record-replay-advanced.cpp.tmp.testdir
# executed command: mkdir -p /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/tools/omp-kernel-replay/Output/record-replay-advanced.cpp.tmp.testdir
# note: command had no output on stdout or stderr
# RUN: at line 5
env LIBOMPTARGET_RECORD=1 LIBOMPTARGET_RECORD_MEMSIZE=536870912 LIBOMPTARGET_RECORD_DIR=/home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/tools/omp-kernel-replay/Output/record-replay-advanced.cpp.tmp.testdir /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/tools/omp-kernel-replay/Output/record-replay-advanced.cpp.tmp 2>&1 | /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/./bin/FileCheck /home/botworker/builds/openmp-offload-amdgpu-clang-flang/llvm.src/offload/test/tools/omp-kernel-replay/record-replay-advanced.cpp
# executed command: env LIBOMPTARGET_RECORD=1 LIBOMPTARGET_RECORD_MEMSIZE=536870912 LIBOMPTARGET_RECORD_DIR=/home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/tools/omp-kernel-replay/Output/record-replay-advanced.cpp.tmp.testdir /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/tools/omp-kernel-replay/Output/record-replay-advanced.cpp.tmp
# note: command had no output on stdout or stderr
# executed command: /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/./bin/FileCheck /home/botworker/builds/openmp-offload-amdgpu-clang-flang/llvm.src/offload/test/tools/omp-kernel-replay/record-replay-advanced.cpp
# note: command had no output on stdout or stderr
# RUN: at line 6
ls -t /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/tools/omp-kernel-replay/Output/record-replay-advanced.cpp.tmp.testdir/*.json | sed -n '1p' | grep . | xargs -I {} /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/./bin/llvm-omp-kernel-replay --verify {}
# executed command: ls -t '/home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/tools/omp-kernel-replay/Output/record-replay-advanced.cpp.tmp.testdir/*.json'
# note: command had no output on stdout or stderr
# executed command: sed -n 1p
# note: command had no output on stdout or stderr
# executed command: grep .
# note: command had no output on stdout or stderr
# executed command: xargs -I '{}' /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/./bin/llvm-omp-kernel-replay --verify '{}'
# .---command stdout------------
# | [llvm-omp-kernel-replay] Replay device memory verified!
# `-----------------------------
# RUN: at line 7
ls -t /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/tools/omp-kernel-replay/Output/record-replay-advanced.cpp.tmp.testdir/*.json | sed -n '2p' | grep . | xargs -I {} /home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/./bin/llvm-omp-kernel-replay --verify {}
# executed command: ls -t '/home/botworker/builds/openmp-offload-amdgpu-clang-flang/build/llvm.build/runtimes/runtimes-bins/offload/test/amdgcn-amd-amdhsa/tools/omp-kernel-replay/Output/record-replay-advanced.cpp.tmp.testdir/*.json'

```

</details>

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


More information about the flang-commits mailing list