| Issue |
162360
|
| Summary |
[CIR] Upstream pointer subtraction handling
|
| Labels |
ClangIR
|
| Assignees |
|
| Reporter |
andykaylor
|
### Overview
Upstream support for subtracting pointer values using the `cir.ptr_diff` operation. This will also require upstreaming the code to lower `cir.ptr_diff` to LLVM IR.
### Suggested minimal test case
```
unsigned long long test_ptr_diff(int *a, int* b) {
return a - b;
}
```
### Existing incubator tests
clang/test/CIR/CodeGen/ptrdiff.c
clang/test/CIR/CodeGen/ptrdiff.cpp
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs