[clang] [flang] [llvm] [mlir] [IRBuilder] Use ptrtoaddr in CreatePtrDiff() (PR #181855)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 18 09:00:50 PST 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 134975 tests passed
* 3188 tests skipped
* 1 test failed
## Failed Tests
(click on a test name to see its output)
### Flang
<details>
<summary>Flang.Integration/OpenMP/map-types-and-sizes.f90</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 9
c:\_work\llvm-project\llvm-project\build\bin\flang.exe -fc1 -emit-llvm -fopenmp -mmlir --enable-delayed-privatization-staging=false -fopenmp-version=51 -fopenmp-targets=amdgcn-amd-amdhsa C:\_work\llvm-project\llvm-project\flang\test\Integration\OpenMP\map-types-and-sizes.f90 -o - | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\flang\test\Integration\OpenMP\map-types-and-sizes.f90 --check-prefixes=CHECK,CHECK-NO-FPRIV
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\flang.exe' -fc1 -emit-llvm -fopenmp -mmlir --enable-delayed-privatization-staging=false -fopenmp-version=51 -fopenmp-targets=amdgcn-amd-amdhsa 'C:\_work\llvm-project\llvm-project\flang\test\Integration\OpenMP\map-types-and-sizes.f90' -o -
# .---command stderr------------
# | warning: OpenMP support for version 51 in flang is still incomplete
# | C:\_work\llvm-project\llvm-project\flang\test\Integration\OpenMP\map-types-and-sizes.f90:41:16: warning: Variable 'p' in IS_DEVICE_PTR clause must be a dummy argument. This semantic check is deprecated from OpenMP 5.2 and later. [-Wopen-mp-usage]
# | !$omp target is_device_ptr(p)
# | ^^^^^^^^^^^^^^^^
# `-----------------------------
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\flang\test\Integration\OpenMP\map-types-and-sizes.f90' --check-prefixes=CHECK,CHECK-NO-FPRIV
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\flang\test\Integration\OpenMP\map-types-and-sizes.f90:632:9: error: CHECK: expected string not found in input
# | !CHECK: %[[NULL_SEL:.*]] = select i1 %[[CMP_NULL]], i64 0, i64 %[[MEMBER_SIZE_CALC_3]]
# | ^
# | <stdin>:2119:39: note: scanning from here
# | %53 = icmp eq ptr %array_offset, null
# | ^
# | <stdin>:2119:39: note: with "CMP_NULL" equal to "53"
# | %53 = icmp eq ptr %array_offset, null
# | ^
# | <stdin>:2119:39: note: with "MEMBER_SIZE_CALC_3" equal to "35"
# | %53 = icmp eq ptr %array_offset, null
# | ^
# | <stdin>:2120:2: note: possible intended match here
# | %54 = select i1 %53, i64 0, i64 %36
# | ^
# | C:\_work\llvm-project\llvm-project\flang\test\Integration\OpenMP\map-types-and-sizes.f90:713:9: error: CHECK: expected string not found in input
# | !CHECK: %[[NULL_SEL:.*]] = select i1 %[[NULL_CMP]], i64 0, i64 %[[ALLOCATABLE_MEMBER_SIZE_CALC_3]]
# | ^
# | <stdin>:2313:39: note: scanning from here
# | %57 = icmp eq ptr %array_offset, null
# | ^
# | <stdin>:2313:39: note: with "NULL_CMP" equal to "57"
# | %57 = icmp eq ptr %array_offset, null
# | ^
# | <stdin>:2313:39: note: with "ALLOCATABLE_MEMBER_SIZE_CALC_3" equal to "38"
# | %57 = icmp eq ptr %array_offset, null
# | ^
# | <stdin>:2314:2: note: possible intended match here
# | %58 = select i1 %57, i64 0, i64 %40
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\flang\test\Integration\OpenMP\map-types-and-sizes.f90
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 2114: %48 = ptrtoaddr ptr %43 to i64
# | 2115: %49 = ptrtoaddr ptr %47 to i64
# | 2116: %50 = sub i64 %48, %49
# | 2117: %51 = icmp eq ptr %37, null
# | 2118: %52 = select i1 %51, i64 0, i64 136
# | 2119: %53 = icmp eq ptr %array_offset, null
# | check:632'0 X error: no match found
# | check:632'1 with "CMP_NULL" equal to "53"
# | check:632'2 with "MEMBER_SIZE_CALC_3" equal to "35"
# | 2120: %54 = select i1 %53, i64 0, i64 %36
# | check:632'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:632'3 ? possible intended match
# | 2121: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %.offload_sizes, ptr align 8 @.offload_sizes.60, i64 72, i1 false)
# | check:632'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 2122: %55 = getelementptr inbounds [9 x ptr], ptr %.offload_baseptrs, i32 0, i32 0
# | check:632'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 2123: store ptr %8, ptr %55, align 8
# | check:632'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 2124: %56 = getelementptr inbounds [9 x ptr], ptr %.offload_ptrs, i32 0, i32 0
# | check:632'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 2125: store ptr %8, ptr %56, align 8
# | check:632'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | 2308: %52 = ptrtoaddr ptr %47 to i64
# | 2309: %53 = ptrtoaddr ptr %51 to i64
# | 2310: %54 = sub i64 %52, %53
# | 2311: %55 = icmp eq ptr %41, null
# | 2312: %56 = select i1 %55, i64 0, i64 240
# | 2313: %57 = icmp eq ptr %array_offset, null
# | check:713'0 X error: no match found
# | check:713'1 with "NULL_CMP" equal to "57"
# | check:713'2 with "ALLOCATABLE_MEMBER_SIZE_CALC_3" equal to "38"
# | 2314: %58 = select i1 %57, i64 0, i64 %40
# | check:713'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:713'3 ? possible intended match
# | 2315: call void @llvm.memcpy.p0.p0.i64(ptr align 8 %.offload_sizes, ptr align 8 @.offload_sizes.63, i64 72, i1 false)
# | check:713'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 2316: %59 = getelementptr inbounds [9 x ptr], ptr %.offload_baseptrs, i32 0, i32 0
# | check:713'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 2317: store ptr %8, ptr %59, align 8
# | check:713'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 2318: %60 = getelementptr inbounds [9 x ptr], ptr %.offload_ptrs, i32 0, i32 0
# | check:713'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 2319: store ptr %8, ptr %60, align 8
# | check:713'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/181855
More information about the cfe-commits
mailing list