[PATCH] X86: Stop LEA64_32r lying about its operands

Tim Northover tnorthover at apple.com
Wed Jun 5 16:43:46 PDT 2013


Hi all,

I’ve got a patch here which replaces the current LEA64_32r instruction (which takes GR32ish arguments that are then hacked into their GR64 counterparts at the last possible moment (MCInstLowering)) with one which takes the real GR64ish operands all the way through.

Largely it’s a drop-in replacement for the current instruction, but I have discovered one exception: MachineSinking has been specifically coded not to sink SUBREG_TO_REG instructions which are necessary for type-consistency in the new scheme. As a result sometimes shorter sequences of instructions get sunk down.

This is the cause of the two non-trivial test changes (machine-cse.ll and MachineSink-CritEdge.ll). It has the potential to cause a performance regression, but I’ve not been able to extract enough statistical significance from LNT to say for sure.

Should I commit?

Cheers.

Tim.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lea64_32r.diff
Type: application/octet-stream
Size: 21816 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130605/7497f0a7/attachment.obj>


More information about the llvm-commits mailing list