[LLVMdev] Bad legalization?

Eli Friedman eli.friedman at gmail.com
Mon Sep 15 18:56:53 PDT 2008

On Mon, Sep 15, 2008 at 3:05 PM, Villmow, Micah <Micah.Villmow at amd.com> wrote:
> I am getting an assert on a bad legalization.
> Assertion failed: Result.getValueType() == Op.getValueType() && "Bad
> legalization!", file ..\..\lib\CodeGen\SelectionDAG\LegalizeDAG.cpp, line
> 3976
> Can someone explain to me what this means in term of backend code
> generation, how it might be occurring, and possible ways to fix this? I
> don't see how the value type of an operation and the result being the same
> can cause an issue.

This roughly means that the type of the result of running
SelectionDAGLegalize::LegalizeOp is not the same as the type of the
argument to LegalizeOp.  Most likely, your custom legalization messing
up, although it's possible there's a bug in


More information about the llvm-dev mailing list