[LLVMdev] Legalizing types: when do operands get updated?

Duncan Sands baldrick at free.fr
Wed Nov 19 07:17:00 PST 2008


> Promote integer operand: 0xe00722c: ch = store 0xcc056f0, 0xe00700c,
> 0xe007094, 0xe0071a4 <0xcc02bbc:0> alignment=16
> [--Crash occurs here--]

on my machine it does not crash here.  Instead, CellSPU tries to custom
lower the i1 store and produces a v128i1 vector (craziness!) and eventually
a custom node v128i1 = SPUISD::SHUFB 0x29eb798, 0x29eb398, 0x29eb698 with
an illegal type.  At that point it crashes because this is not allowed.
So maybe you have some local patches applied?

> The crash occurs because the second operand to store is still an i1; it
> doesn't appear to have been updated to the i8 that was previously legalized.

It's hard to comment without being able to reproduce the problem.  It works
on other platforms, so presumably there is something CellSPU specific going

> Stores for CellSPU are custom lowered.

You shouldn't try to custom lower stores of i1 (or other illegal types)
however.  I see that CellSPU currently does though: it sets the operation
action for store of i1 to Custom.  I think this is a mistake.

> Is it my responsibility to promote
> the second operand or should I expect that the store's operands be updated
> after they have been type-legalized?

The result of type legalization should be a truncstore of i8 to i1.  However
this will not be the case if the target custom lowers the i1 store to something



More information about the llvm-dev mailing list