What I want to do is to change the pInst from : 2%= load double* %1, align 8 to 2% = load < 2 x double>* %1, align 16, where <2 x double> should be two double identical double values that is same as the one in the previous instruction
Instruction* ScalarToVectorLoad(Instruction* pInst) {
Value *loadValue = pInst->getOperand(0);
Instruction *newLoad; //this one should be 2% = load < 2 x double>* %1
BitCastInst *scalarToVector = new BitCastInst(loadValue, VectorType::get(Type::getDoubleTy(currF->getContext()), 2), "vectorizedLoad", pInst);
newLoad = new LoadInst(); //to be implemented...
return newLoad;
}