AnsweredAssumed Answered

Bug on compiler

Question asked by hojin on Oct 15, 2012
Latest reply on Oct 18, 2012 by Bdot

I just compiled this small codes. But its binary size is too big.

The below code is the part of my code having bug.

This code works properly on NVIDIA or INTEL.

 

typedef struct

{

          short block[12][64];

}MB_information;

typedef struct

{

          int block_count;

}idct_new_params;

typedef struct

{

}picture_params;

void Saturate(short* Block_Ptr)

{

                    Block_Ptr[63] ^= 1;

}

__kernel void idct_new(idct_new_params inp, picture_params pp, __global MB_information * MBinfo, __global unsigned char* frf, __global unsigned char* brf, __global unsigned char* crf)

{

                    //int MBA=inp.MBA;

                    //int MBA= get_global_id(0);

                    int block_count=inp.block_count;

                    //MB_information MB=MBinfo[MBA];

                    MB_information MB=MBinfo[0];

                    for (int comp=0; comp<block_count; comp++)

                    {

                              Saturate(MB.block[comp]);

                    }

          return;

}

 

I attatched some codes and generated IR.

It seems that the amd opencl compiler generates garbage instructions.

Attachments

Outcomes