is this a bug in the VC++ optimizer or in my code?-Collection of common programming errors
Tried the following vector subtraction code with a console project generated by VS2012 Update 1. I didn’t really touch the default options other than disabling global optimizations and enabling assembler listings.
Compiled with x64 release configuration on Windows 7 x64 SP1.
#include
#include
#include
typedef unsigned short ushort;
typedef unsigned int uint;
void print(__m128i i)
{
auto& arr = i.m128i_u16;
printf("[%d %d %d %d %d %d %d %d]\n", arr[0], arr[1], arr[2], arr[3], arr[4], arr[5], arr[6], arr[7]);
}
int _tmain(int argc, _TCHAR* argv[])
{
const int lineSize = 912;
ushort input[lineSize];
ushort vals[lineSize];
// printf("%X %X\n", input, vals); // note this one
for (uint i=0; i
Originally posted 2013-11-09 20:50:38.