We were (unintentionally) only using structural equivalence to compare struct types.

Now we require that the struct name match for two struct types to be the same.
Added a test to check this.
(Also removed a stale test, movmsk-opt.ispc)
This commit is contained in:
Matt Pharr
2012-01-04 11:44:00 -08:00
parent 1a81173c93
commit 5d35349dc9
3 changed files with 16 additions and 35 deletions

View File

@@ -2448,6 +2448,8 @@ lCheckTypeEquality(const Type *a, const Type *b, bool ignoreConst) {
if (sta != NULL && stb != NULL) {
if (sta->GetElementCount() != stb->GetElementCount())
return false;
if (sta->GetStructName() != stb->GetStructName())
return false;
for (int i = 0; i < sta->GetElementCount(); ++i)
if (!lCheckTypeEquality(sta->GetElementType(i), stb->GetElementType(i),
ignoreConst))