projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
98ae8f8
)
[X86] Remove check for X86ISD::AND with no flag users from the TEST instruction immed...
author
Craig Topper
<craig.topper@intel.com>
Mon, 12 Feb 2018 03:02:01 +0000
(
03:02
+0000)
committer
Craig Topper
<craig.topper@intel.com>
Mon, 12 Feb 2018 03:02:01 +0000
(
03:02
+0000)
We turn X86ISD::AND with no flag users back to ISD::AND in PreprocessISelDAG.
llvm-svn: 324864
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
index
5313fc6
..
95442c0
100644
(file)
--- a/
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
+++ b/
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
@@
-3080,8
+3080,7
@@
void X86DAGToDAGISel::Select(SDNode *Node) {
// Look for (X86cmp (and $op, $imm), 0) and see if we can convert it to
// use a smaller encoding.
// Look past the truncate if CMP is the only use of it.
- if ((N0.getOpcode() == ISD::AND ||
- (N0.getResNo() == 0 && N0.getOpcode() == X86ISD::AND)) &&
+ if (N0.getOpcode() == ISD::AND &&
N0.getNode()->hasOneUse() &&
N0.getValueType() != MVT::i8 &&
X86::isZeroNode(N1)) {