[PATCH] D62819: [SCCP] Add UnaryOperator visitor to SCCP

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 3 12:28:45 PDT 2019


fhahn added a reviewer: fhahn.
fhahn added a comment.

Thanks for adding this.

Please also add non-undef tests for unary operators, e.g. something like '%v = fneg double 10.0` or `%v1 = fadd double 10.0, 20.0; %v2 = fneg double %v1`.



================
Comment at: llvm/lib/Transforms/Scalar/SCCP.cpp:975
+void SCCPSolver::visitUnaryOperator(Instruction &I) {
+  LatticeVal VState = getValueState(I.getOperand(0));
+
----------------
nit: I think Op0V or something that makes it explicit that this ties back to the first operand of the instruction would be a slightly better name.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62819/new/

https://reviews.llvm.org/D62819





More information about the llvm-commits mailing list