| Issue |
233678
|
| Summary |
llubi reports unequal pointers with identical address bits
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
Roticv912
|
With 64-bit pointer representations and 32-bit addresses, icmp eq returns false for these pointers with identical address bits, making the program return 0 instead of the expected 1.
### Program
```
target datalayout = "e-p:64:64:64:32"
define i32 @main() {
%p = inttoptr i64 4294967296 to ptr
%c = icmp eq ptr %p, null
%r = zext i1 %c to i32
ret i32 %r
}
```
### Output
```
Entering function: main
%p = inttoptr i64 4294967296 to ptr => ptr 0x100000000 [nullary]
%c = icmp eq ptr %p, null => F
%r = zext i1 %c to i32 => i32 0
ret i32 %r
Exiting function: main
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs