[PATCH] D63941: [Float2Int] Add support for unary FNeg to Float2Int

James Molloy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 1 02:37:07 PDT 2019


jmolloy accepted this revision.
jmolloy added a comment.
This revision is now accepted and ready to land.

LGTM with one simplification. Thanks!



================
Comment at: llvm/lib/Transforms/Scalar/Float2Int.cpp:250
+        auto Zero = ConstantRange(APInt::getNullValue(Size));
+        return Zero.binaryOp(BinOp, Ops[0]);
+      };
----------------
I would just use:

    return Zero.sub(Ops[0]);


Repository:
  rL LLVM

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

https://reviews.llvm.org/D63941





More information about the llvm-commits mailing list