Index: llvm/trunk/lib/Analysis/CFLGraph.h =================================================================== --- llvm/trunk/lib/Analysis/CFLGraph.h +++ llvm/trunk/lib/Analysis/CFLGraph.h @@ -291,6 +291,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!"); } Index: llvm/trunk/test/Analysis/CFLAliasAnalysis/Steensgaard/must-and-partial.ll =================================================================== --- llvm/trunk/test/Analysis/CFLAliasAnalysis/Steensgaard/must-and-partial.ll +++ llvm/trunk/test/Analysis/CFLAliasAnalysis/Steensgaard/must-and-partial.ll @@ -49,6 +49,7 @@ %1 = load double, double* %arrayidx22 %arrayidx25 = getelementptr inbounds double, double* %A, i64 2 %2 = load double, double* %arrayidx25 - %mul26 = fmul double %1, %2 + %3 = fneg double %1 + %mul26 = fmul double %3, %2 ret void }