Remove sub-vector load/store address hack.
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>
diff --git a/src/Reactor/SubzeroReactor.cpp b/src/Reactor/SubzeroReactor.cpp
index 31f0aaf..7e607d9 100644
--- a/src/Reactor/SubzeroReactor.cpp
+++ b/src/Reactor/SubzeroReactor.cpp
@@ -853,7 +853,7 @@
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);
@@ -864,7 +864,7 @@
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;