[llvm] r181937 - X86: Remove redundant test instructions

Chris Lattner clattner at apple.com
Thu May 16 10:02:59 PDT 2013


On May 15, 2013, at 9:38 PM, David Majnemer <david.majnemer at gmail.com> wrote:
> 
> Hi David,
> 
> Would it make sense to capture this information in the .td file, by having tblgen through it into TSFlags?  (see X86Inst in X86InstrFormats.td).  Having a giant table like this in a .cpp file always makes me sad.
> 
> I considered this until I understood how the shift family of instructions (SAL, SAR, SHL, SHR) interact with EFLAGS:
> they only modify the flags if the shift count (modulo 32 or 64, depending if the instruction is REX.W prefixed) is non-zero.
> 
> If you think that it's possible despite the shift ugliness, I'll give it a shot.

This only affects variable shifts using CL, which you really really don't want to use the flags result of anyway (for performance reasons).  We shouldn't ever generate fixed sized shifts of zero.

-Chris

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130516/41195301/attachment.html>


More information about the llvm-commits mailing list