Commit 7d9a748e by Ben Clayton

Subzero: Fix warning ‘Ty’ may be used uninitialized

Bug: b/130343040 Change-Id: I4e69330929ddc81f840c01fe9ceb8a06d5869f53 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/29049 Presubmit-Ready: Ben Clayton <bclayton@google.com> Tested-by: 's avatarBen Clayton <bclayton@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent b24990c7
......@@ -740,7 +740,7 @@ static void getAMDProcessorTypeAndSubtype(unsigned int Family,
static unsigned getAvailableFeatures(unsigned int ECX, unsigned int EDX,
unsigned MaxLeaf) {
unsigned Features = 0;
unsigned int EAX, EBX;
unsigned int EAX = 0, EBX = 0;
Features |= (((EDX >> 23) & 1) << FEATURE_MMX);
Features |= (((EDX >> 25) & 1) << FEATURE_SSE);
Features |= (((EDX >> 26) & 1) << FEATURE_SSE2);
......@@ -796,8 +796,8 @@ StringRef sys::getHostCPUName() {
detectX86FamilyModel(EAX, &Family, &Model);
Features = getAvailableFeatures(ECX, EDX, MaxLeaf);
unsigned Type;
unsigned Subtype;
unsigned Type = 0;
unsigned Subtype = 0;
if (Vendor == SIG_INTEL) {
getIntelProcessorTypeAndSubtype(Family, Model, Brand_id, Features, &Type,
......
......@@ -5300,7 +5300,7 @@ void TargetX86Base<TraitsType>::lowerMemset(Operand *Dest, Operand *Val,
// reverse order. Then handle any remainder with overlapping copies. Since
// the remainder will be at the end, there will be reduces pressure on the
// memory unit as the access to the same memory are far apart.
Type Ty;
Type Ty = IceType_void;
if (ValValue == 0 && CountValue >= BytesPerStoreq &&
CountValue <= BytesPerStorep * Traits::MEMSET_UNROLL_LIMIT) {
// When the value is zero it can be loaded into a vector register cheaply
......
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