[LLVMdev] llvm 'select' instruction

James Courtier-Dutton james.dutton at gmail.com
Sun Apr 14 05:45:23 PDT 2013


Something like this should do the job (taken from a test file from the
libbeauty decompiler project):

/* A very simple jump table. */
int test58(int var1) {
        int n = 0;
        switch (var1) {
        case 1:
                n = 1;
                break;
        case 2:
                n = 2;
                break;
        case 3:
                n = 3;
                break;
        case 4:
                n = 4;
                break;
        case 5:
                n = 5;
                break;
        }
        return n;



On 14 April 2013 13:17, Dong Chen <jameschennerd at gmail.com> wrote:

> hello guys:
> i am thinking about what kind of C instructions can turn into llvm IR
> 'select' instruction.
> i tried "d=a?b:c" and compiled it using clang, i still didn't get 'select'
> is there anybody who knows this?
> thank you
>
>
>
> --
> View this message in context:
> http://llvm.1065342.n5.nabble.com/llvm-select-instruction-tp56719.html
> Sent from the LLVM - Dev mailing list archive at Nabble.com.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130414/79fc4f38/attachment.html>


More information about the llvm-dev mailing list