diff --git a/llvm/lib/Analysis/CFLGraph.h b/llvm/lib/Analysis/CFLGraph.h --- a/llvm/lib/Analysis/CFLGraph.h +++ b/llvm/lib/Analysis/CFLGraph.h @@ -292,6 +292,11 @@ addAssignEdge(Op2, &Inst); } + void visitUnaryOperator(UnaryOperator &Inst) { + auto *Src = Inst.getOperand(0); + addAssignEdge(Src, &Inst); + } + void visitAtomicCmpXchgInst(AtomicCmpXchgInst &Inst) { auto *Ptr = Inst.getPointerOperand(); auto *Val = Inst.getNewValOperand(); @@ -579,6 +584,11 @@ break; } + case Instruction::FNeg: { + addAssignEdge(CE->getOperand(0), CE); + break; + } + default: llvm_unreachable("Unknown instruction type encountered!"); }