@@ -4180,8 +4180,12 @@ LLVMToSPIRVBase::transBuiltinToInstWithoutDecoration(Op OC, CallInst *CI,
4180
4180
return cast<llvm::ConstantInt>(O)->getZExtValue ();
4181
4181
});
4182
4182
4183
- return BM->addFixedPointIntelInst (OC, transType (ResTy), Input, Literals,
4184
- BB);
4183
+ auto *APIntInst =
4184
+ BM->addFixedPointIntelInst (OC, transType (ResTy), Input, Literals, BB);
4185
+ if (!CI->hasStructRetAttr ())
4186
+ return APIntInst;
4187
+ return BM->addStoreInst (transValue (CI->getArgOperand (0 ), BB), APIntInst, {},
4188
+ BB);
4185
4189
}
4186
4190
case OpArbitraryFloatCastINTEL:
4187
4191
case OpArbitraryFloatCastFromIntINTEL:
@@ -4263,8 +4267,12 @@ LLVMToSPIRVBase::transBuiltinToInstWithoutDecoration(Op OC, CallInst *CI,
4263
4267
return cast<llvm::ConstantInt>(O)->getZExtValue ();
4264
4268
});
4265
4269
4266
- return BM->addArbFloatPointIntelInst (OC, transType (ResTy), InA, nullptr ,
4267
- Literals, BB);
4270
+ auto *APIntInst = BM->addArbFloatPointIntelInst (OC, transType (ResTy), InA,
4271
+ nullptr , Literals, BB);
4272
+ if (!CI->hasStructRetAttr ())
4273
+ return APIntInst;
4274
+ return BM->addStoreInst (transValue (CI->getArgOperand (0 ), BB), APIntInst, {},
4275
+ BB);
4268
4276
}
4269
4277
case OpArbitraryFloatAddINTEL:
4270
4278
case OpArbitraryFloatSubINTEL:
@@ -4335,8 +4343,12 @@ LLVMToSPIRVBase::transBuiltinToInstWithoutDecoration(Op OC, CallInst *CI,
4335
4343
return cast<llvm::ConstantInt>(O)->getZExtValue ();
4336
4344
});
4337
4345
4338
- return BM->addArbFloatPointIntelInst (OC, transType (ResTy), InA, InB,
4339
- Literals, BB);
4346
+ auto *APIntInst = BM->addArbFloatPointIntelInst (OC, transType (ResTy), InA,
4347
+ InB, Literals, BB);
4348
+ if (!CI->hasStructRetAttr ())
4349
+ return APIntInst;
4350
+ return BM->addStoreInst (transValue (CI->getArgOperand (0 ), BB), APIntInst, {},
4351
+ BB);
4340
4352
}
4341
4353
default : {
4342
4354
if (isCvtOpCode (OC) && OC != OpGenericCastToPtrExplicit) {
0 commit comments