-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bitcast between long and double on x86-64 #1405
Comments
assigned to @lattner |
Mine. |
I think this is a codegen bug Reid, -Chris |
This one looks like yours Evan. It seems the TD for x86-64 isn't handling bit The test case for it has already been committed to Regression/CodeGen/X86. Reid. |
The preferred fix for this is to expand it into movd/movq. However, Evan is busy with other things, so Testcase here: CodeGen/X86/bitcast.ll -Chris _test1: |
Actually, MOVQ apparently doesn't do 64-bit GPR to SSE reg. I implemented the movd case, compiling bitcast.ll::test3/test4 to: _test3: Patch here: |
Extended Description
On x86-64 a bitcast from long to double or double to long results triggers an
llc abort. Among other things, this comes up in the expansion of copysign.
long %p(double %t) {
%u = bitcast double %t to long
ret long %u
}
double %q(long %t) {
%u = bitcast long %t to double
ret double %u
}
With llc -march=x86-64, this gets
Cannot yet select: 0x8813318: f64 = bit_convert 0x88135c8
The text was updated successfully, but these errors were encountered: