[LLVMdev] global type legalization?

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Aug 18 11:13:18 PDT 2010


On Aug 18, 2010, at 9:56 AM, Chris Lattner wrote:

> Some things to consider: When the input to the zext is spilled, the reload can be folded into the zext on almost all targets, making the zext free.  When the zext *isn't* folded into a load, what you're really looking for is a code placement pass which tries to put the zexts in non-redundant (and non-partially redundant) places.

That makes sense to me, but note that this is not currently implemented. All our RISC-like targets only support folding of COPY to load/store through the target-independent mechanisms.

It should be fairly simple to add a foldMemoryOperandImpl override to ARM that folds load+zext into a zextload.

/jakob





More information about the llvm-dev mailing list