[PATCH] CodeGenPrepare: Avoid and/or i1 in select conditions.
hfinkel at anl.gov
hfinkel at anl.gov
Fri Feb 6 11:43:30 PST 2015
In http://reviews.llvm.org/D7399#119931, @MatzeB wrote:
> 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...
It's not (and it was pointed out to me in a different thread a couple of months ago); which function does this again? I keep forgetting to fix this... (my current plan is to turn it off when TLI->hasMultipleConditionRegisters() is true, which is only the case on PPC AFAIK).
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