summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2019-02-09 17:03:59 +0000
committerSanjay Patel <spatel@rotateright.com>2019-02-09 17:03:59 +0000
commit7467510453be40019a746aedfff85909776e7e4f (patch)
tree658359f5d4030bdd806e65a61f5f29b139f3c3bb /llvm/lib/CodeGen
parentf31cf49c587ec1d72c9b93a80bd085640b4d50ca (diff)
downloadbcm5719-llvm-7467510453be40019a746aedfff85909776e7e4f.tar.gz
bcm5719-llvm-7467510453be40019a746aedfff85909776e7e4f.zip
[TargetLowering] add tests to show effect of setcc sub->shift; NFC
There's effectively no difference for the cases with variables. We just trade a sub for an add on those. But the case with a subtract from constant would require an extra move instruction on x86, so this looks like a reasonable generic combine. llvm-svn: 353619
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index b933f032409..eae5a45906f 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -3075,7 +3075,6 @@ SDValue TargetLowering::SimplifySetCC(EVT VT, SDValue N0, SDValue N1,
DAG.getConstant(0, dl, N0.getValueType()),
Cond);
// The shift is not valid if this is a bool (i1).
- // TODO: This transform needs evidence to justify its existence.
if (N0.getNode()->hasOneUse() && OpVT.getScalarSizeInBits() != 1) {
assert(N0.getOpcode() == ISD::SUB && "Unexpected operation!");
auto &DL = DAG.getDataLayout();
OpenPOWER on IntegriCloud