Skip to content

Commit

Permalink
Backport #107601 (#107725)
Browse files Browse the repository at this point in the history
Co-authored-by: SwapnilGaikwad <swapnil.gaikwad@arm.com>
  • Loading branch information
amanasifkhalid and SwapnilGaikwad committed Sep 12, 2024
1 parent c04c2b7 commit a1e1019
Showing 1 changed file with 10 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@

const string VecReduceUnOpTest_VectorValidationLogicForCndSel = @"
{
var hasFailed = (mask[0] != 0 ? {ValidateReduceOpResult}: (falseVal[0] != result[0]));
var hasFailed = (mask[0] != 0) ? ({ValidateReduceOpResult}): (falseVal[0] != result[0]);

if (hasFailed)
{
Expand All @@ -232,28 +232,19 @@
{
for (var i = 1; i < RetElementCount; i++)
{
var iterResult = (mask[i] != 0) ? 0 : falseVal[i];
if (mask[i] != 0)
hasFailed = (mask[i] != 0) ? ({ValidateRemainingResults}) : (falseVal[i] != result[i]);
if (hasFailed)
{
// Pick the trueValue
if (iterResult != result[i])
{
succeeded = false;
break;
}
}
else
{
// For false, the values are merged with destination, and we do not know
// those contents would be, so skip verification for them.
succeeded = false;
break;
}
}
}
}";

const string VecReduceUnOpTest_VectorValidationLogicForCndSel_FalseValue = @"
{
var hasFailed = (mask[0] != 0) ? (trueVal[0] != result[0]): {ValidateReduceOpResult};
var hasFailed = (mask[0] != 0) ? (trueVal[0] != result[0]): ({ValidateReduceOpResult});
if (hasFailed)
{
succeeded = false;
Expand All @@ -262,20 +253,11 @@
{
for (var i = 1; i < RetElementCount; i++)
{
var iterResult = (mask[i] != 0) ? trueVal[i] : 0;
if (mask[i] != 0)
hasFailed = (mask[i] != 0) ? (trueVal[i] != result[i]) : ({ValidateRemainingResults});
if (hasFailed)
{
// Pick the trueValue
if (iterResult != result[i])
{
succeeded = false;
break;
}
}
else
{
// For false, the values are merged with destination, and we do not know
// those contents would be, so skip verification for them.
succeeded = false;
break;
}
}
}
Expand Down

0 comments on commit a1e1019

Please sign in to comment.