[LLVMdev] Trunc Load
Johannes Birgmeier
e0902998 at student.tuwien.ac.at
Thu Oct 27 09:29:12 PDT 2011
> Hi Johannes, what processor are you targeting? Is it little-endian or
> big-endian?
Little-endian. (The truth: you can set it manually, but it is set to
little endian, for sure.) The processor is a TI TMS320C64x.
Follow-up: I discovered that the "guilty" method is
DAGCombiner::ReduceLoadWidth. The error is introduced because the offset
is not calculated correctly.
The first problem is that the pointer I get for loading does not point
to the address of the low word, but to the address of the high word.
The second problem is that this is apparently correct as long as lddw is
used instead of ldw.
Do you have any ideas on this?
(The third problem is that the creation of the pointer is not my doing.
I'm just extending our backend to support i64 additionally (instead of
just i32 and smaller). Doing this turns out to be trickier than expected.)
Cheers,
Johannes
More information about the llvm-dev
mailing list