ir/tests/debug.Windows-x86_64/swap_001.irt
2023-03-02 17:57:26 +03:00

27 lines
469 B
Plaintext
Executable File

--TEST--
001: Swap operands of commutative instruction
--TARGET--
Windows-x86_64
--ARGS--
-S
--CODE--
{
l_1 = START(l_5);
double x = PARAM(l_1, "x", 1);
double y = PARAM(l_1, "y", 2);
double v = VAR(l_1, "_spill_");
l_2 = VSTORE(l_1, v, y);
double z, l_3 = VLOAD(l_2, v);
double ret = ADD(z, x);
l_4 = VSTORE(l_3, v, ret);
l_5 = RETURN(l_4);
}
--EXPECT--
test:
subq $8, %rsp
movsd %xmm1, (%rsp)
addsd (%rsp), %xmm0
movsd %xmm0, (%rsp)
addq $8, %rsp
retq