1 Reply Latest reply: Feb 7, 2013 11:39 PM by himanshu.gautam RSS

LLVM error when compiling kernel

s23ba32 Newbie
Currently Being Moderated

I am getting this error message:

LLVM ERROR: Cannot select: 0xb1e670: i8 = setcc 0xa94230, 0xf72f00, 0xae22a0 [ID=25]

  0xa94230: i32 = AMDILISD::ADD 0xf72f00, 0xf6f7d0 [ID=22]

    0xf72f00: i32 = mul 0xb30210, 0xf99250 [ORD=831] [ID=19]

      0xb30210: i32,ch = CopyFromReg 0xbbea30, 0xb71800 [ORD=830] [ID=14]

        0xb71800: i32 = Register %vreg41 [ORD=830] [ID=1]

      0xf99250: i32 = Constant<-83941> [ORD=831] [ID=3]

    0xf6f7d0: i32,ch = CopyFromReg 0xbbea30, 0xae37b0 [ORD=830] [ID=15]

      0xae37b0: i32 = Register %vreg42 [ORD=830] [ID=2]

  0xf72f00: i32 = mul 0xb30210, 0xf99250 [ORD=831] [ID=19]

    0xb30210: i32,ch = CopyFromReg 0xbbea30, 0xb71800 [ORD=830] [ID=14]

      0xb71800: i32 = Register %vreg41 [ORD=830] [ID=1]

    0xf99250: i32 = Constant<-83941> [ORD=831] [ID=3]

 

This is the code that is triggering the error:

typedef struct{ uint x; uint c; } mwc64x_state_t;

 

enum{ MWC64X_A = 4294883355U };

enum{ MWC64X_M = 18446383549859758079UL };

 

void MWC64X_Step(mwc64x_state_t *s)

{

    uint X=s->x, C=s->c;

 

    uint Xn=MWC64X_A*X+C;

    uint carry=(uint)(Xn<C);

                     

    // Replacing this line with a constant makes the error go away.  

    uint Cn=mad_hi(MWC64X_A,X,carry);

 

    s->x=Xn;

 

    // As does replacing this assignment with a constant.

    s->c=Cn;

}

  • Re: LLVM error when compiling kernel
    himanshu.gautam Expert
    Currently Being Moderated

    Hi,

    Can you let us your system setup details: CPU, GPU, SDK , Driver, OS (Window/Linux) (32/64)

    I copied your function MXC64X_step inside a opencl sample, and ran the sample. So I assume, I am able to compile your code with out any issues. I used SDK 2.8, Win8 64 bit, 13.1 driver, AMD A10 5800K APU with HD 7660D iGPU.

    Regards

    Himanshu , Bruhaspati

    --------------------------------

    The information presented in this document is for informational purposes only and may contain technical inaccuracies, omissions and typographical errors. Links to third party sites are for convenience only, and no endorsement is implied

More Like This

  • Retrieving data ...

Legend

  • Correct Answers - 4 points
  • Helpful Answers - 2 points