Fix bug with mask used for gather/scatter code generation.

We should always use the full mask for this, never the internal mask.
Added tests for this.
This commit is contained in:
Matt Pharr
2011-12-06 15:51:56 -08:00
parent 27c53a3c25
commit 198aa9620e
3 changed files with 36 additions and 2 deletions

View File

@@ -1691,7 +1691,7 @@ FunctionEmitContext::LoadInst(llvm::Value *ptr, llvm::Value *mask,
else {
// Otherwise we should have a varying ptr and it's time for a
// gather.
return gather(ptr, ptrType, mask, name);
return gather(ptr, ptrType, GetFullMask(), name);
}
}
@@ -2055,7 +2055,7 @@ FunctionEmitContext::StoreInst(llvm::Value *value, llvm::Value *ptr,
assert(ptrType->IsVaryingType());
// We have a varying ptr (an array of pointers), so it's time to
// scatter
scatter(value, ptr, ptrType, mask);
scatter(value, ptr, ptrType, GetFullMask());
}
}