[EXT_EP-11011] HE lost implicit conversions on vector with scalar operators Created: 04/Jan/23  Updated: 04/Jan/23  Resolved: 04/Jan/23

Status: Fixed
Project: Embedded Software & Tools
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Medium
Reporter: TI User Assignee: TI User
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Product: Code Generation Tools
Internal ID: CODEGEN-10249
Found In Release: C7000_3.0.0.STS
Fix In Release: C7000_3.1.0.LTS*
Affected Platform/Device: default
Workaround: Use an explicit cast on the scalar operand to the vector element type.

 Description   

Vector operators in which one operand is a scalar may not apply implicit conversions to the scalar operand in host emulation. For example, the following will result in a compilation error due to failing template argument deduction in host emulation:

uint8_t op2;
int16 foo(int * op1, int ch)

{ return ((int16)op1[ch]) * op2; }

Workaround:
If the scalar operand is explicitly cast to the element type of the vector, no compilation error will occur in host emulation:

uint8_t op2;
int16 foo(int * op1, int ch)

{ return ((int16)op1[ch]) * (int32_t) op2; }
Generated at Wed Apr 23 18:49:06 CDT 2025 using Jira 9.12.17#9120017-sha1:aba4002bcd633f188b6a4bb5dd8a0e1f20b79ee4.