[PATCH] D48754: recognize more abs pattern
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 28 22:56:06 PDT 2018
craig.topper added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:17528
+ bool IntegerAbs = false;
ConstantSDNode *SubC = nullptr;
+ bool N1CGtNegOne =
----------------
Just declare this local to the 2 blocks that need since it doesn't live outside of them.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:17530
+ bool N1CGtNegOne =
+ (N1C->isNullValue() && (CC == ISD::SETGT || CC == ISD::SETGE)) ||
+ (N1C->isAllOnesValue() && CC == ISD::SETGT);
----------------
You probably don't need the GE/LE checks. We should be canonicalizing those away by altering the constant.
https://reviews.llvm.org/D48754
More information about the llvm-commits
mailing list