Commit f3fff9ba by Antonio Maiorano

SubzeroReactor: fix assertion !isVectorType(Ty)

This assert happens when legalizing the operand of an InstAlloca, which comes from when we want to allocate an IceType_v4f32 on the stack. The ConstantInteger32 we create has the wrong type, and Subzero asserts. Bug: b/130459196 Change-Id: I43bd5e516dcd549f5fd35a62ee97cef284a9e656 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/38870 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarBen Clayton <bclayton@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Tested-by: 's avatarAntonio Maiorano <amaiorano@google.com>
parent 6f946f4e
...@@ -716,7 +716,7 @@ namespace rr ...@@ -716,7 +716,7 @@ namespace rr
int typeSize = Ice::typeWidthInBytes(type); int typeSize = Ice::typeWidthInBytes(type);
int totalSize = typeSize * (arraySize ? arraySize : 1); int totalSize = typeSize * (arraySize ? arraySize : 1);
auto bytes = Ice::ConstantInteger32::create(::context, type, totalSize); auto bytes = Ice::ConstantInteger32::create(::context, Ice::IceType_i32, totalSize);
auto address = ::function->makeVariable(T(getPointerType(t))); auto address = ::function->makeVariable(T(getPointerType(t)));
auto alloca = Ice::InstAlloca::create(::function, address, bytes, typeSize); auto alloca = Ice::InstAlloca::create(::function, address, bytes, typeSize);
::function->getEntryNode()->getInsts().push_front(alloca); ::function->getEntryNode()->getInsts().push_front(alloca);
......
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