mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
18 lines
496 B
MLIR
18 lines
496 B
MLIR
//
|
|
// This file is distributed under the MIT License. See LICENSE.md for details.
|
|
//
|
|
|
|
// RUN: %root/bin/revng clift-opt %s
|
|
|
|
!int32_t = !clift.int<signed 4>
|
|
!int32_t$ptr = !clift.ptr<8 to !int32_t>
|
|
!ptrdiff_t = !clift.int<signed 8>
|
|
|
|
%p = clift.undef : !int32_t$ptr
|
|
%i = clift.imm 0 : !ptrdiff_t
|
|
|
|
clift.ptr_add %p, %i : (!int32_t$ptr, !ptrdiff_t)
|
|
clift.ptr_add %i, %p : (!ptrdiff_t, !int32_t$ptr)
|
|
clift.ptr_sub %p, %i : (!int32_t$ptr, !ptrdiff_t)
|
|
clift.ptr_diff %p, %p : !int32_t$ptr -> !ptrdiff_t
|