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/13008
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Reactor/SubzeroReactor.cpp b/src/Reactor/SubzeroReactor.cpp
index a50677f..55a55c3 100644
--- a/src/Reactor/SubzeroReactor.cpp
+++ b/src/Reactor/SubzeroReactor.cpp
@@ -843,7 +843,7 @@
 		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 @@
 	{
 		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 @@
 		}
 		else
 		{
-			assert(T(value->getType()) == type);
+			assert(value->getType() == T(type));
 
 			auto store = Ice::InstStore::create(::function, value, ptr, align);
 			::basicBlock->appendInst(store);