[llvm-commits] [llvm] r157755 - in /llvm/trunk: include/llvm/Target/TargetInstrInfo.h lib/CodeGen/PeepholeOptimizer.cpp lib/Target/X86/X86InstrInfo.cpp lib/Target/X86/X86InstrInfo.h test/CodeGen/X86/jump_sign.ll

Joerg Sonnenberger joerg at britannica.bec.de
Mon Jun 4 12:52:20 PDT 2012


On Mon, Jun 04, 2012 at 12:36:48PM -0700, Evan Cheng wrote:
> This particular optimization seems like a instruction selection issue
> to me. If the output of a sub is not used but it's flag output is used,
> then isel should select a cmp instead. Using the peephole to do this
> seems like a rather large hammer. It also feels like it's simply
> covering up an isel deficiency to me.

http://llvm.org/bugs/show_bug.cgi?id=9784 has a few cases where using
dec/inc is more efficient in terms of code size than cmp. Granted,
that's another special case of this.

Joerg



More information about the llvm-commits mailing list