forked from OSchip/llvm-project
parent
4c04a9333a
commit
9458e6a551
|
@ -686,11 +686,16 @@ SDOperand SelectionDAG::getConstantFP(double Val, MVT::ValueType VT,
|
||||||
AddNodeIDNode(ID, Opc, getVTList(EltVT), 0, 0);
|
AddNodeIDNode(ID, Opc, getVTList(EltVT), 0, 0);
|
||||||
ID.AddDouble(Val);
|
ID.AddDouble(Val);
|
||||||
void *IP = 0;
|
void *IP = 0;
|
||||||
if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP))
|
SDNode *N = NULL;
|
||||||
return SDOperand(E, 0);
|
if ((N = CSEMap.FindNodeOrInsertPos(ID, IP)))
|
||||||
SDNode *N = new ConstantFPSDNode(isTarget, Val, EltVT);
|
if (!MVT::isVector(VT))
|
||||||
CSEMap.InsertNode(N, IP);
|
return SDOperand(N, 0);
|
||||||
AllNodes.push_back(N);
|
if (!N) {
|
||||||
|
N = new ConstantFPSDNode(isTarget, Val, EltVT);
|
||||||
|
CSEMap.InsertNode(N, IP);
|
||||||
|
AllNodes.push_back(N);
|
||||||
|
}
|
||||||
|
|
||||||
SDOperand Result(N, 0);
|
SDOperand Result(N, 0);
|
||||||
if (MVT::isVector(VT)) {
|
if (MVT::isVector(VT)) {
|
||||||
SmallVector<SDOperand, 8> Ops;
|
SmallVector<SDOperand, 8> Ops;
|
||||||
|
|
Loading…
Reference in New Issue