[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[creduce-bugs] crash 1/2
$ "/home/regehr/creduce-install/libexec/clang_delta"
--transformation=template-non-type-arg-to-int --counter=1 small.cpp
Segmentation fault
typedef int __m64 __attribute__ ((__vector_size__ (8), __may_alias__));
typedef short __v4hi __attribute__ ((__vector_size__ (8)));
__m64 _mm_unpacklo_pi16___m1;
__m64 _mm_unpacklo_pi16___m2;
__m64 _mm_sub_pi16___m2;
__m64 _mm_slli_pi16___m;
template <class T> class TwoDArray {
typedef short* element_type;
public: element_type& operator[](const int pos);
const element_type& operator[](const int pos) const ;
};
class PicArray: public TwoDArray<short> {};
template <class T> class MotionVector {
public:
int x,y;
};
typedef struct
u_mmx_val;
void simple_biblock_diff_pic_mmx_4( const PicArray& pic_data, const PicArray& ref_data, TwoDArray<short>& diff, const MotionVector<int>& start_pos, const MotionVector<int>& end_pos, const MotionVector<int>& ref_start, const MotionVector<int>& ref_stop, const MotionVector<int>& rmdr) {
__m64 __trans_tmp_3;
__m64 __trans_tmp_2;
__m64 __trans_tmp_1;
short *pic_curr = &pic_data[start_pos.y][start_pos.x];
short *ref_curr = &ref_data[ref_start.y][ref_start.x];
short *diff_curr = &diff[0][0];
const int width = end_pos.x - start_pos.x;
int height = end_pos.y - start_pos.y;
const int pic_next = 0 - width;
const int ref_next = 0*2 - width*2;
int stopX = (width>>2)<<2;
rmdr.x == 0 && rmdr.y == 0;
for( int y=0;
0 < height;
y++, pic_curr+=pic_next, ref_curr+=ref_next)
for( int x=0;
0 < stopX;
x+=4, pic_curr+=4, ref_curr+=8, diff_curr += 4 ) {
__m64 pic = *(__m64 *)4;
{
{
int __count = 0;
__trans_tmp_1 = (__m64) __builtin_ia32_psllwi ((__v4hi)_mm_slli_pi16___m, 0);
}
pic = __trans_tmp_1;
}
{
{}
__m64 ref = __trans_tmp_2;
}
{
{__m64 __m1 = __trans_tmp_1;
__trans_tmp_3 = (__m64) __builtin_ia32_psubw ((__v4hi)__trans_tmp_1, (__v4hi)_mm_sub_pi16___m2);
}
*(__m64 *)diff_curr = __trans_tmp_3;
}
}
for (int x = stopX;
stopX < width;
++stopX, ++pic_curr, ++diff_curr, ref_curr+=2) ;
}