[PATCH] D25221: [PPC][DAGCombine] Convert SETCC to subtract when the result is zero extended

Kit Barton via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 10 11:46:34 PST 2016


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

Aside from some minor formatting of comments, this LGTM.



================
Comment at: lib/Target/PowerPC/PPCISelLowering.cpp:9924
+// comparison is kept in a GPR instead of CR. This function is purely for
+// codegen purposes and has some flags to guide the codegen process.
+static SDValue GenerateEquivalentSub(SDNode *N, int Size, bool Complement,
----------------
doxygen-style comments please


================
Comment at: lib/Target/PowerPC/PPCISelLowering.h:973
+    // with integer subtraction when (1) there is a legal way of doing it.
+    // (2) keeping the result of comparison in GPR has some performance benefit.
+    SDValue ConvertSETCCToSubtract(SDNode *N, DAGCombinerInfo &DCI) const;
----------------
Can you please convert to doxygen-style comments?


================
Comment at: test/CodeGen/PowerPC/setcc-to-sub.ll:2
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
+; RUN: -mcpu=pwr8 < %s | FileCheck %s
+
----------------
Is there any reason this has to be run on pwr8?


https://reviews.llvm.org/D25221





More information about the llvm-commits mailing list