[PATCH] D12150: Add DAG optimisation for FP16_TO_FP

Oliver Stannard via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 24 02:39:17 PDT 2015


olista01 added inline comments.

================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:12987
@@ +12986,3 @@
+  if (N0->getOpcode() == ISD::AND) {
+    ConstantSDNode *AndConst = getAsNonOpaqueConstant(N0.getOperand(1));
+    if (AndConst && AndConst->getAPIntValue() == 0xffff) {
----------------
rengolin wrote:
> Is this always (op & 0xffff) or can you also have (0xffff & op)?
visitAND canonicalises ANDs to have the constant (if there is one) on the RHS, so this isn't necessary.


Repository:
  rL LLVM

http://reviews.llvm.org/D12150





More information about the llvm-commits mailing list