Skip to content

Commit 6adbbc8

Browse files
igorban-inteligcbot
authored andcommitted
Minor fixes and refactors.
1 parent d895809 commit 6adbbc8

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

IGC/VectorCompiler/lib/GenXCodeGen/GenXConstants.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2043,22 +2043,19 @@ void ConstantLoader::analyzeForPackedInt(unsigned NumElements) {
20432043
// packed unsigned int with no extra scaling or adjustment.
20442044
PackedIntScale = 1;
20452045
PackedIntAdjust = 0;
2046-
PackedIntMax = Max;
20472046
return;
20482047
}
20492048
if (Min >= ImmIntVec::MinSInt && Max <= ImmIntVec::MaxSInt) {
20502049
// Values all in the range [MinSInt..MaxSInt]. We can do this with a
20512050
// packed unsigned int with no extra scaling or adjustment.
20522051
PackedIntScale = 1;
20532052
PackedIntAdjust = -8;
2054-
PackedIntMax = Max + 8;
20552053
return;
20562054
}
20572055
// Values all in the range [Min..Min+MaxUInt]. We can do this
20582056
// with a packed int with an adjustment.
20592057
PackedIntScale = 1;
20602058
PackedIntAdjust = Min;
2061-
PackedIntMax = Max - Min;
20622059
return;
20632060
}
20642061
// Get unique absolute differences, so we can detect if we have a valid
@@ -2097,7 +2094,6 @@ void ConstantLoader::analyzeForPackedInt(unsigned NumElements) {
20972094
return; // range of values too big
20982095
}
20992096
PackedIntScale = CurScale;
2100-
PackedIntMax = ImmIntVec::MaxUInt;
21012097
// Special case adjust of 0 or -8 as then we can save doing an adjust at all
21022098
// by using unsigned or signed packed vector respectively.
21032099
if (!(Min % CurScale)) {
@@ -2115,7 +2111,6 @@ void ConstantLoader::analyzeForPackedInt(unsigned NumElements) {
21152111
CurScale, static_cast<int64_t>(ImmIntVec::MaxSInt), ResArith) &&
21162112
Max <= ResArith)) {
21172113
PackedIntAdjust = Min;
2118-
PackedIntMax = ImmIntVec::MaxSInt;
21192114
return;
21202115
}
21212116
// Special case all pre-scaled values being in [-15,0] as we can do that

IGC/VectorCompiler/lib/GenXCodeGen/GenXConstants.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ class ConstantLoader {
4646
int64_t PackedIntScale = 0; // amount to scale packed int vector by
4747
int64_t PackedIntAdjust = 0; // amount to adjust by, special casing 0 or -8
4848
// when PackedIntScale is 1
49-
unsigned PackedIntMax = 0; // max value in packed vector, used when scale is
50-
// 1 and adjust is 0 to tell whether it would fit
51-
// in 0..7
5249
bool PackedFloat = false;
5350

5451
public:

0 commit comments

Comments
 (0)