The code was produced by LDC based on the following source:
// Loads exponent of a floating-point number.
real ldexpl(real arg, int exp)
{
pragma(LDC_allow_inline);
return __asm!(real)("fscale", "={st},{st(1)},{st},~{st(1)}", exp, arg);
}
Expected instruction sequence is something like this:
fild exp;
fld arg;
fscale;
fstp arg;
I assume that the fild instruction causes the problem.
Extended Description
The attached bug.ll creates the following failure:
if compiled with llc bug.ll on Windows 7 64bit.
The code was produced by LDC based on the following source:
Expected instruction sequence is something like this:
I assume that the fild instruction causes the problem.