Files
2026-06-03 13:59:53 +02:00

40 lines
1014 B
MLIR

//
// This file is distributed under the MIT License. See LICENSE.md for details.
//
// RUN: %root/bin/revng clift-opt --emit-c %s -o /dev/null | FileCheck %s
// RUN: %root/bin/revng clift-opt --emit-c=ptml %s -o /dev/null | %root/bin/revng ptml | FileCheck %s
!void = !clift.void
!int32_t = !clift.int<signed 4>
!f = !clift.func<
"/type-definition/1001-CABIFunctionDefinition" : !void()
>
module attributes {clift.module} {
// CHECK: void fun_0x40001001(void) {
clift.func @fun_0x40001001<!f>() attributes {
handle = "/function/0x40001001:Code_x86_64"
} {
// CHECK: while (2) {
clift.while cond {
%2 = clift.imm 2 : !int32_t
clift.yield %2 : !int32_t
} body {
// CHECK: 3;
clift.expr {
%3 = clift.imm 3 : !int32_t
clift.yield %3 : !int32_t
}
// CHECK: 4;
clift.expr {
%4 = clift.imm 4 : !int32_t
clift.yield %4 : !int32_t
}
}
// CHECK: }
}
// CHECK: }
}