Dedicated unit tests for loops which contain a conditional assignment inside
the loop body.
Details
Details
Diff Detail
Diff Detail
- Repository
- rT test-suite
- Build Status
Buildable 216834 Build 331991: arc lint + arc unit
Event Timeline
Comment Actions
I think this is missing a cas.reference_output file? It might also be good to use a more descriptive file name.
| SingleSource/UnitTests/Vectorizer/csa.cpp | ||
|---|---|---|
| 13 ↗ | (On Diff #500883) | I just landed D143377 which moves some of the helpers to a header. It would be good to use those instead of duplicating them here. |
Comment Actions
- Add reference output file.
- Use more descriptive file name.
- Move helperes into common header file.
| SingleSource/UnitTests/Vectorizer/conditional_scalar_assignment.cpp | ||
|---|---|---|
| 43 | Why Post? How about put the return statement behind the main loop? DEFINE_SCALAR_AND_VECTOR_FN4(
int t = -1;,
for (int i = 0; i < N; i++) {
if (i < data0[i])
t = data0[i];
}
return t;,
); | |
Why Post? How about put the return statement behind the main loop?
DEFINE_SCALAR_AND_VECTOR_FN4( int t = -1;, for (int i = 0; i < N; i++) { if (i < data0[i]) t = data0[i]; } return t;, );