@@ -170,6 +170,11 @@ bool PushAnalysis::IsStatelessCBLoad(
170
170
{
171
171
/*
172
172
find 64 bit case
173
+ %29 = call { i32, i32 } @llvm.genx.GenISA.ptr.to.pair.p2v3f32(<3 x float> addrspace(2)* %runtime_value_6)
174
+ %30 = extractvalue { i32, i32 } %29, 1
175
+ %31 = extractvalue { i32, i32 } %29, 0
176
+ %32 = call <4 x float> addrspace(2)* @llvm.genx.GenISA.pair.to.ptr.p2v4f32(i32 %31, i32 %30)
177
+ or
173
178
%33 = call { i32, i32 } @llvm.genx.GenISA.ptr.to.pair.p2v4f32(<4 x float> addrspace(2)* %runtime_value_4)
174
179
%34 = extractvalue { i32, i32 } %33, 0
175
180
%35 = extractvalue { i32, i32 } %33, 1
@@ -184,19 +189,25 @@ bool PushAnalysis::IsStatelessCBLoad(
184
189
ExtractValueInst *Hi = dyn_cast<ExtractValueInst>(genIntr->getOperand (1 ));
185
190
if (Lo && Hi && Lo->getOperand (0 ) == Hi->getOperand (0 ))
186
191
{
187
- if (GenIntrinsicInst* AddPair = dyn_cast<GenIntrinsicInst>(Lo->getOperand (0 )))
192
+ if (GenIntrinsicInst* genIntr2 = dyn_cast<GenIntrinsicInst>(Lo->getOperand (0 )))
188
193
{
189
- if (AddPair ->getIntrinsicID () == GenISAIntrinsic::GenISA_add_pair )
194
+ if (genIntr2 ->getIntrinsicID () == GenISAIntrinsic::GenISA_ptr_to_pair )
190
195
{
191
- ExtractValueInst *Lo2 = dyn_cast<ExtractValueInst>(AddPair->getOperand (0 ));
192
- ExtractValueInst *Hi2 = dyn_cast<ExtractValueInst>(AddPair->getOperand (1 ));
196
+ offset = 0 ;
197
+ pAddress = genIntr2->getOperand (0 );
198
+ }
199
+
200
+ if (genIntr2->getIntrinsicID () == GenISAIntrinsic::GenISA_add_pair)
201
+ {
202
+ ExtractValueInst *Lo2 = dyn_cast<ExtractValueInst>(genIntr2->getOperand (0 ));
203
+ ExtractValueInst *Hi2 = dyn_cast<ExtractValueInst>(genIntr2->getOperand (1 ));
193
204
if (Lo2 && Hi2 && Lo2->getOperand (0 ) == Hi2->getOperand (0 ))
194
205
{
195
206
if (GenIntrinsicInst* ptrToPair = dyn_cast<GenIntrinsicInst>(Lo2->getOperand (0 )))
196
207
{
197
208
if (ptrToPair->getIntrinsicID () == GenISAIntrinsic::GenISA_ptr_to_pair)
198
209
{
199
- ConstantInt* pConst = dyn_cast<llvm::ConstantInt>(AddPair ->getOperand (2 ));
210
+ ConstantInt* pConst = dyn_cast<llvm::ConstantInt>(genIntr2 ->getOperand (2 ));
200
211
if (!pConst)
201
212
return false ;
202
213
offset = (uint)pConst->getZExtValue ();
0 commit comments