SPRUIG8J January 2018 – March 2024
Comparisons of vectors as conditions in
if
-statements are not supported by the C7000 compiler. For example if
src1
and
src2
are vectors, the following would be an unsupported use:
int ex_compare_unsupported(short16 src1, short16 src2)
{
if (src1 > src2) { return 1; } // Unsupported, will not work properly
else { return 2; }
}
You should instead use the vector comparison intrinsics listed in the
c7x.h
runtime support header file to construct a vector predicate. Vector predicates are described in Section 5.14.8.