ir/tests/llvm/vaddr_001.irt

19 lines
262 B
Plaintext
Raw Normal View History

2023-09-28 19:44:45 +02:00
--TEST--
001: vaddr function
--ARGS--
--emit-llvm
--CODE--
{
l_1 = START(l_2);
int32_t d_2 = VAR(l_1, "v");
uintptr_t d_3 = VADDR(d_2);
l_2 = RETURN(l_1, d_3);
}
--EXPECT--
define ptr @test()
{
%d2 = alloca i32
%d3 = bitcast ptr %d2 to ptr
ret ptr %d3
}