The Optimizer used to assume that loads and stores using the same
address are of the same tpe. This is false for emulated sub-vector
load/store, and thus we tricked it into thinking the addresses are
different by performing some redundant arithmetic. This is no longer
necessary now that the Optimizer checks the types being loaded/stored.
Bug swiftshader:48
Change-Id: Ic212d67fefd9e8dd902ff576b69458208c3c379d
Reviewed-on: https://swiftshader-review.googlesource.com/11088
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
if(typeSize(type) == 4)
{
auto pointer = RValue<Pointer<Byte>>(ptr);
- Int x = *Pointer<Int>(pointer +1-1);
+ Int x = *Pointer<Int>(pointer);
Int4 vector;
vector = Insert(vector, x, 0);
else if(typeSize(type) == 8)
{
auto pointer = RValue<Pointer<Byte>>(ptr);
- Int x = *Pointer<Int>(pointer +1-1);
+ Int x = *Pointer<Int>(pointer);
Int y = *Pointer<Int>(pointer + 4);
Int4 vector;