-
Bug
-
Resolution: Unresolved
-
Not Prioritized
-
Code Generation Tools
-
CODEGEN-11783
-
-
default
The attached file no_tmp.c has these lines ...
for (signed int loopIdx = 0; loopIdx < 6; loopIdx++) { __int16 vJamFlg = *((__int16 *)(&jamFlg[offset])); vbJamFlg[loopIdx] = __cmp_eq_bool(vJamFlg, vOnes); __bool16 vbValidFlg = __and(__negate(vbJamFlg[loopIdx]), vbFlg); res += (signed int)vbValidFlg.s[0]; offset += length; }
The attached file uses_tmp.c has code that is similar, but introduces a variable vbTmp that is used in place of vbJamFlg[loopIdx] in a few places.
for (signed int loopIdx = 0; loopIdx < 6; loopIdx++) { __int16 vJamFlg = *((__int16 *)(&jamFlg[offset])); vbTmp = __cmp_eq_bool(vJamFlg, vOnes); __bool16 vbValidFlg = __and(__negate(vbTmp), vbFlg); res += (signed int)vbValidFlg.s[0]; vbJamFlg[loopIdx] = vbTmp; offset += length; }
Build ...
$ cl7x -@options.txt no_tmp.c uses_tmp.c [no_tmp.c] [uses_tmp.c]
The same result should be computed into vbJamFlg[]. But it isn't.