|
@@ -6174,10 +6174,14 @@ static T GetWaveMultiPrefixInitialAccumValue(LPCWSTR testName) {
|
|
|
} else if (_wcsicmp(testName, L"WaveMultiPrefixSum") == 0 ||
|
|
|
_wcsicmp(testName, L"WaveMultiPrefixUSum") == 0 ||
|
|
|
_wcsicmp(testName, L"WaveMultiPrefixBitOr") == 0 ||
|
|
|
+ _wcsicmp(testName, L"WaveMultiPrefixUBitOr") == 0 ||
|
|
|
_wcsicmp(testName, L"WaveMultiPrefixBitXor") == 0 ||
|
|
|
- _wcsicmp(testName, L"WaveMultiPrefixCountBits") == 0) {
|
|
|
+ _wcsicmp(testName, L"WaveMultiPrefixUBitXor") == 0 ||
|
|
|
+ _wcsicmp(testName, L"WaveMultiPrefixCountBits") == 0 ||
|
|
|
+ _wcsicmp(testName, L"WaveMultiPrefixUCountBits") == 0) {
|
|
|
return static_cast<T>(0);
|
|
|
- } else if (_wcsicmp(testName, L"WaveMultiPrefixBitAnd") == 0) {
|
|
|
+ } else if (_wcsicmp(testName, L"WaveMultiPrefixBitAnd") == 0 ||
|
|
|
+ _wcsicmp(testName, L"WaveMultiPrefixUBitAnd") == 0) {
|
|
|
return static_cast<T>(-1);
|
|
|
} else {
|
|
|
return static_cast<T>(0);
|
|
@@ -6192,17 +6196,21 @@ std::function<T(T, T)> GetWaveMultiPrefixReferenceFunction(LPCWSTR testName) {
|
|
|
} else if (_wcsicmp(testName, L"WaveMultiPrefixSum") == 0 ||
|
|
|
_wcsicmp(testName, L"WaveMultiPrefixUSum") == 0) {
|
|
|
return [] (T lhs, T rhs) -> T { return lhs + rhs; };
|
|
|
- } else if (_wcsicmp(testName, L"WaveMultiPrefixBitAnd") == 0) {
|
|
|
+ } else if (_wcsicmp(testName, L"WaveMultiPrefixBitAnd") == 0 ||
|
|
|
+ _wcsicmp(testName, L"WaveMultiPrefixUBitAnd") == 0) {
|
|
|
return [] (T lhs, T rhs) -> T { return lhs & rhs; };
|
|
|
- } else if (_wcsicmp(testName, L"WaveMultiPrefixBitOr") == 0) {
|
|
|
+ } else if (_wcsicmp(testName, L"WaveMultiPrefixBitOr") == 0 ||
|
|
|
+ _wcsicmp(testName, L"WaveMultiPrefixUBitOr") == 0) {
|
|
|
return [] (T lhs, T rhs) -> T { return lhs | rhs; };
|
|
|
- } else if (_wcsicmp(testName, L"WaveMultiPrefixBitXor") == 0) {
|
|
|
+ } else if (_wcsicmp(testName, L"WaveMultiPrefixBitXor") == 0 ||
|
|
|
+ _wcsicmp(testName, L"WaveMultiPrefixUBitXor") == 0) {
|
|
|
return [] (T lhs, T rhs) -> T { return lhs ^ rhs; };
|
|
|
- } else if (_wcsicmp(testName, L"WaveMultiPrefixCountBits") == 0) {
|
|
|
+ } else if (_wcsicmp(testName, L"WaveMultiPrefixCountBits") == 0 ||
|
|
|
+ _wcsicmp(testName, L"WaveMultiPrefixUCountBits") == 0) {
|
|
|
// For CountBits, each lane contributes a boolean value. The test input is
|
|
|
- // an integer, so convert to a boolean by computing (input > 10) If this
|
|
|
- // condition is true, we contribute one to the bit count.
|
|
|
- return [] (T lhs, T rhs) -> T { return lhs + (rhs > 10 ? 1 : 0); };
|
|
|
+ // a zero or non-zero integer. If the input is a non-zero value then the
|
|
|
+ // condition is true, thus we contribute one to the bit count.
|
|
|
+ return [] (T lhs, T rhs) -> T { return lhs + (rhs ? 1 : 0); };
|
|
|
} else {
|
|
|
return [] (T lhs, T rhs) -> T { return 0; };
|
|
|
}
|
|
@@ -6304,6 +6312,14 @@ ExecutionTest::WaveIntrinsicsMultiPrefixOpTest(TableParameter *pParameterList,
|
|
|
|
|
|
for (auto &w : waves) {
|
|
|
std::vector<PerThreadData *> &waveData = w.second;
|
|
|
+
|
|
|
+ struct {
|
|
|
+ bool operator()(PerThreadData *a, PerThreadData *b) const {
|
|
|
+ return (a->laneId < b->laneId);
|
|
|
+ }
|
|
|
+ } compare;
|
|
|
+ // Need to sort based on the lane id
|
|
|
+ std::sort(waveData.begin(), waveData.end(), compare);
|
|
|
|
|
|
LogCommentFmt(L"LaneId Mask Key Value Result Expected");
|
|
|
LogCommentFmt(L"-------- -------- -------- -------- -------- --------");
|