projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c6fd6cd
)
don't insert an and node if it isn't needed here, this can prevent folding
author
Chris Lattner
<sabre@nondot.org>
Mon, 30 Jan 2006 04:22:28 +0000
(
04:22
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Mon, 30 Jan 2006 04:22:28 +0000
(
04:22
+0000)
of lowered target nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25804
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 44ce9981a62377b7dc546849d12d769a07f9ca8c..04fef370171effbb31f9b4ff04953125c6234550 100644
(file)
--- a/
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/
lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@
-1284,7
+1284,9
@@
SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
} else {
// Make sure the condition is either zero or one. It may have been
// promoted from something else.
- Tmp1 = DAG.getZeroExtendInReg(Tmp1, MVT::i1);
+ unsigned NumBits = MVT::getSizeInBits(Tmp1.getValueType());
+ if (!TLI.MaskedValueIsZero(Tmp1, (~0ULL >> (64-NumBits))^1))
+ Tmp1 = DAG.getZeroExtendInReg(Tmp1, MVT::i1);
Result = DAG.getSelectCC(Tmp1,
DAG.getConstant(0, Tmp1.getValueType()),
Tmp2, Tmp3, ISD::SETNE);