diff options
author | Sanjay Patel <spatel@rotateright.com> | 2016-04-09 16:02:52 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2016-04-09 16:02:52 +0000 |
commit | 4abae4e0faea4930ca7d941358ba535835cba1c0 (patch) | |
tree | 317f10654af1f78a2ed4f32fdcce4b4a54156fac /llvm/lib/CodeGen/SelectionDAG | |
parent | 1cc5712763e6af3aa1f181680a9359280e6adc14 (diff) | |
download | bcm5719-llvm-4abae4e0faea4930ca7d941358ba535835cba1c0.tar.gz bcm5719-llvm-4abae4e0faea4930ca7d941358ba535835cba1c0.zip |
[x86] use BMI 'andn' for logic + compare ops
With BMI, we can use 'andn' to save an instruction when the result is only used in a compare.
This is related to one of the potential sequences to check 'isfinite' in:
https://llvm.org/bugs/show_bug.cgi?id=27164
Differential Revision: http://reviews.llvm.org/D18910
llvm-svn: 265875
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 1183c5cbc83..a28ce41a660 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -6708,6 +6708,10 @@ bool llvm::isOneConstant(SDValue V) { return Const != nullptr && Const->isOne(); } +bool llvm::isBitwiseNot(SDValue V) { + return V.getOpcode() == ISD::XOR && isAllOnesConstant(V.getOperand(1)); +} + HandleSDNode::~HandleSDNode() { DropOperands(); } |