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
ret i64 doesn't work on 16-bit targets #1233
Comments
assigned to @lattner |
The code generator is built to allow recursive expansion (expand i64 -> 2xi32 then each i32 -> 2x i16). If you track down the specific cases that don't work, we can get them fixed. What is the stack trace for -Chris |
The stack trace: #3 0x086e9d66 in (anonymous namespace)::SelectionDAGLegalize::LegalizeOp
|
Okay, the problem is that the dag is bogus. Can you find out what is making the i32 copytoreg nodes? -Chris |
OK, I thought it might be my custom RET lowering code at fault, but now I'm not So I guess the bug is in the generic RET legalize code? Those i32 copytoreg MVT::ValueType ArgVT = Op.getOperand(1).getValueType(); |
err, I meant 1/3/5/9 of course, not 1/3/5/7. |
This should fix the ret i64 case, lemme know if it doesn't. http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20060821/036913.html -Chris |
[flang] Add a missing CMake dependency
Extended Description
on a target with only i16 registers, the following code:
ulong %foo() { ret ulong 31189350395091 }
asserts in legalization: instead of being legalized down to 4xi16, it gets
turned into 2xi32 and then trips over an assert (LegalizeDAG.cpp:1458, "Register
type must be legal!") - the code there seems to assume that if an integer isn't
legal, one "break up" into two smaller regs is sufficient to make it so. This is
true for any target with i32 regs since i64 is the biggest we have, but if even
i32 isn't legal for a target, further legalization is required.
The text was updated successfully, but these errors were encountered: