return UndefValue::get(VectorType::get(ty, size));
}
- Value *Builder::VBROADCAST(Value *src)
+ Value *Builder::VBROADCAST(Value *src, const llvm::Twine& name)
{
// check if src is already a vector
if (src->getType()->isVectorTy())
return src;
}
- return VECTOR_SPLAT(mVWidth, src);
+ return VECTOR_SPLAT(mVWidth, src, name);
}
Value *Builder::VBROADCAST_16(Value *src)
return STORE(val, GEPA(basePtr, valIndices));
}
- CallInst *Builder::CALL(Value *Callee, const std::initializer_list<Value*> &argsList)
+ CallInst *Builder::CALL(Value *Callee, const std::initializer_list<Value*> &argsList, const llvm::Twine& name)
{
std::vector<Value*> args;
for (auto arg : argsList)
args.push_back(arg);
- return CALLA(Callee, args);
+ return CALLA(Callee, args, name);
}
CallInst *Builder::CALL(Value *Callee, Value* arg)
return CALL(func);
}
- Value *Builder::VRCP(Value *va)
+ Value *Builder::VRCP(Value *va, const llvm::Twine& name)
{
- return FDIV(VIMMED1(1.0f), va); // 1 / a
+ return FDIV(VIMMED1(1.0f), va, name); // 1 / a
}
Value *Builder::VPLANEPS(Value* vA, Value* vB, Value* vC, Value* &vX, Value* &vY)
/// @brief Generate a VCVTPH2PS operation (float16->float32 conversion)
/// in LLVM IR. If not supported on the underlying platform, emulate it
/// @param a - 128bit SIMD lane(8x16bit) of float16 in int16 format.
- Value *Builder::CVTPH2PS(Value* a)
+ Value *Builder::CVTPH2PS(Value* a, const llvm::Twine& name)
{
if (JM()->mArch.F16C())
{
- return VCVTPH2PS(a);
+ return VCVTPH2PS(a, name);
}
else
{
pResult = VINSERT(pResult, pConv, C(i));
}
+ pResult->setName(name);
return pResult;
}
}
Value *VUNDEF_IPTR();
-Value *VBROADCAST(Value *src);
+Value *VBROADCAST(Value *src, const llvm::Twine& name = "");
Value *VBROADCAST_16(Value *src);
-Value *VRCP(Value *va);
+Value *VRCP(Value *va, const llvm::Twine& name = "");
Value *VPLANEPS(Value* vA, Value* vB, Value* vC, Value* &vX, Value* &vY);
uint32_t IMMED(Value* i);
Value *IN_BOUNDS_GEP(Value* ptr, const std::initializer_list<Value*> &indexList);
Value *IN_BOUNDS_GEP(Value* ptr, const std::initializer_list<uint32_t> &indexList);
-CallInst *CALL(Value *Callee, const std::initializer_list<Value*> &args);
+CallInst *CALL(Value *Callee, const std::initializer_list<Value*> &args, const llvm::Twine& name = "");
CallInst *CALL(Value *Callee) { return CALLA(Callee); }
CallInst *CALL(Value *Callee, Value* arg);
CallInst *CALL2(Value *Callee, Value* arg1, Value* arg2);
Value *PMOVSXWD(Value* a);
Value *PERMD(Value* a, Value* idx);
Value *PERMPS(Value* a, Value* idx);
-Value *CVTPH2PS(Value* a);
+Value *CVTPH2PS(Value* a, const llvm::Twine& name = "");
Value *CVTPS2PH(Value* a, Value* rounding);
Value *PMAXSD(Value* a, Value* b);
Value *PMINSD(Value* a, Value* b);