mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
31 lines
664 B
MLIR
31 lines
664 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>
|
|
!int64_t = !clift.int<signed 8>
|
|
|
|
!f = !clift.func<
|
|
"/type-definition/1-CABIFunctionDefinition" : !int32_t()
|
|
>
|
|
|
|
!g = !clift.func<
|
|
"/type-definition/2-CABIFunctionDefinition" : !int32_t(!int32_t)
|
|
>
|
|
|
|
!g$ptr = !clift.ptr<8 to !g>
|
|
|
|
module attributes {clift.module} {
|
|
clift.func @f<!f>() {
|
|
clift.return {
|
|
%0 = clift.imm 0 : !int64_t
|
|
%g = clift.bitcast %0 : !int64_t -> !g$ptr
|
|
%i = clift.imm 0 : !int32_t
|
|
%r = clift.call %g(%i) : !g$ptr
|
|
clift.yield %r : !int32_t
|
|
}
|
|
}
|
|
}
|