File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -89,25 +89,19 @@ bool BUNDLE_INFO::doMerge(IR_Builder& builder,
89
89
}
90
90
91
91
int roundDownPow2Size = (int )Round_Down_Pow2 (size);
92
- int roundUpPow2Size = (int )Round_Up_Pow2 (size);
93
- if (size > roundDownPow2Size && size < roundUpPow2Size)
92
+ if (size > roundDownPow2Size)
94
93
{
95
94
for (int pos = 0 , numSrc = inst[0 ]->getNumSrc (); pos < numSrc; ++pos)
96
95
{
97
96
if (srcPattern[pos] == OPND_PATTERN::CONTIGUOUS)
98
97
{
99
98
// since we are rounding up esize to roundUpPow2Size, we have to make sure the source is
100
- // not out of bound. If it is we merge the first roundDownPow2Size insts instead.
101
- G4_SrcRegRegion* lastSrc = inst[size - 1 ]->getSrc (pos)->asSrcRegRegion ();
102
- if ((lastSrc->getLeftBound () + lastSrc->getTypeSize () * (roundUpPow2Size - size)) >=
103
- lastSrc->getTopDcl ()->getByteSize ())
99
+ // not out of bound. To make it safe, we merge the first roundDownPow2Size insts instead.
100
+ while (size > roundDownPow2Size)
104
101
{
105
- while (size > roundDownPow2Size)
106
- {
107
- deleteLastInst ();
108
- }
109
- break ;
102
+ deleteLastInst ();
110
103
}
104
+ break ;
111
105
}
112
106
}
113
107
}
You can’t perform that action at this time.
0 commit comments