Commit f4c4ecab by Nicolas Capens Committed by Nicolas Capens

Spill whole vector registers to the stack.

Subzero assumes that stores and loads to/from stack memory can take an immediate offset. This isn't true for sub-vector loads and stores. We can just use regular full vector loads and stores instead. Bug b/37496321 Change-Id: Iaffd60f8077a4c9d602665421f90a7288ab04050 Reviewed-on: https://swiftshader-review.googlesource.com/13008Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent b098c54d
......@@ -843,7 +843,7 @@ namespace sw
int valueType = (int)reinterpret_cast<intptr_t>(type);
Ice::Variable *result = ::function->makeVariable(T(type));
if(valueType & EmulatedBits)
if((valueType & EmulatedBits) && (align != 0)) // Narrow vector not stored on stack.
{
if(emulateIntrinsics)
{
......@@ -896,7 +896,7 @@ namespace sw
{
int valueType = (int)reinterpret_cast<intptr_t>(type);
if(valueType & EmulatedBits)
if((valueType & EmulatedBits) && (align != 0)) // Narrow vector not stored on stack.
{
if(emulateIntrinsics)
{
......@@ -941,7 +941,7 @@ namespace sw
}
else
{
assert(T(value->getType()) == type);
assert(value->getType() == T(type));
auto store = Ice::InstStore::create(::function, value, ptr, align);
::basicBlock->appendInst(store);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment