[PATCH] CodeGenPrepare: Avoid and/or i1 in select conditions.

Matthias Braun matze at braunis.de
Fri Feb 6 11:33:06 PST 2015


On a side note: Ahmed just mentioned a snipped from SelectionDAGBuilder to me that has pretty much the same logic I do for selects implemented for branches:

// If this is a series of conditions that are or'd or and'd together, emit

  // this as a sequence of branches instead of setcc's with and/or operations.
  // As long as jumps are not expensive, this should improve performance.
  // For example, instead of something like:
  //     cmp A, B
  //     C = seteq
  //     cmp D, E
  //     F = setle
  //     or C, F
  //     jnz foo
  // Emit:
  //     cmp A, B
  //     je foo
  //     cmp D, E
  //     jle foo
  //

...

no idea why that is in SelectionDAGBuilder, it also doesn't seem strictly beneficial to all targets to me...


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D7399

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list