[PATCH] D62791: [CFLGraph] Add support for unary fneg instruction.
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 6 12:20:11 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL362737: [CFLGraph] Add support for unary fneg instruction. (authored by ctopper, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D62791?vs=203396&id=203417#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62791/new/
https://reviews.llvm.org/D62791
Files:
llvm/trunk/lib/Analysis/CFLGraph.h
llvm/trunk/test/Analysis/CFLAliasAnalysis/Steensgaard/must-and-partial.ll
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
}
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!");
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62791.203417.patch
Type: text/x-patch
Size: 1354 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190606/37c94b43/attachment.bin>
More information about the llvm-commits
mailing list