[llvm-commits] [llvm] r163302 - in /llvm/trunk: lib/Transforms/Utils/SimplifyCFG.cpp test/Transforms/SimplifyCFG/switch_create.ll test/Transforms/SimplifyCFG/switch_to_lookup_table.ll

Duncan Sands baldrick at free.fr
Mon Sep 10 01:40:56 PDT 2012


On 10/09/12 10:37, Nadav Rotem wrote:
>
> On Sep 10, 2012, at 11:18 AM, Duncan Sands <baldrick at free.fr
> <mailto:baldrick at free.fr>> wrote:
>
>> alternatively, how about removing the select instruction from the IR
>> altogether?  Maybe "select" really belongs in codegen only...
>
>
> I think that 'select' does belong in the IR.  It provides a nice abstraction for
> a commonly used pattern, and many optimizations rely on it.  Moreover, the
> vector variant of select is very important for vectorization (blending of values).

One pain is that all kinds of conditional logic optimizations have to be
duplicated between "branch on condition" type code, and select.  There are a
couple of PR's about missed optimization on select that wouldn't have been
missed if select didn't exist, because they are handled in the branch case.

Ciao, Duncan.



More information about the llvm-commits mailing list