-
Bug
-
Resolution: Fixed
-
Medium
-
Code Generation Tools
-
CODEGEN-9164
-
-
-
default
-
Remove the restrict keyword
When accessing a vector object or array of vector-elements via a restrict-qualified pointer, the use of subvector/element access (.s0, .s1, etc) via a dereferenced pointer may result in incorrect results.
The following conditions are required in order to see the incorrect behavior:
(1a) A restrict-qualified vector pointer (e.g., int16_ptr) pointing to a native vector type object (int16 myvar) or
(1b) A restrict-qualified vector-element pointer (e.g., int *) pointing to a vector element type object array (e.g. int [] array), and
(2) A vector store to the object/array via the restrict-qualified pointer, and
(3) A subsequent load of an element of the array or vector through the same restrict-qualified pointer with element-access syntax (.s0, .s1, etc).
Other conditions also seem to be required and those need to be investigated.
As supplied, the program builds with --opt_level=2. If that is changed to --opt_level=1, then the program works correctly.