Not crazy at all. If I had any sense at all I would have done that back then. :) I'll make that clean up one of these days.
Evan On Oct 5, 2007, at 4:45 PM, Chris Lattner <[EMAIL PROTECTED]> wrote: >> URL: http://llvm.org/viewvc/llvm-project?rev=42661&view=rev >> Log: >> Commute x86 cmove instructions by swapping the operands and change >> the condition >> to its inverse. >> Testing this as llcbeta > > Random crazy idea: > >> +def CMOVB16rm : I<0x42, MRMSrcMem, // if <u, GR16 = [mem16] >> + (outs GR16:$dst), (ins GR16:$src1, i16mem:$src2), >> + "cmovb\t{$src2, $dst|$dst, $src2}", >> + [(set GR16:$dst, (X86cmov GR16:$src1, (loadi16 >> addr:$src2), >> + X86_COND_B, EFLAGS))]>, >> + TB, OpSize; > > Instead of having one instruction for each comparison code, would it > make sense to have one "CMOV16rm" that took the condcode as an > immediate argument? If you had that, you could change the comparison > just by twiddling the immediate operand and wouldn't have a bazillion > CMOV instructions. > > -Chris > > > _______________________________________________ > llvm-commits mailing list > llvm-commits@cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits