aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-09-25 17:22:52 +0000
committerDan Gohman <gohman@apple.com>2008-09-25 17:22:52 +0000
commit5dd9c2e9aea7294c184609aff7f2fe82eaea4eb0 (patch)
tree0ae9586917e5574ea39d8a595ef46a5330557227
parent77ca41e5c3f99ee8962b21a7d90bb251a594a65e (diff)
downloadexternal_llvm-5dd9c2e9aea7294c184609aff7f2fe82eaea4eb0.zip
external_llvm-5dd9c2e9aea7294c184609aff7f2fe82eaea4eb0.tar.gz
external_llvm-5dd9c2e9aea7294c184609aff7f2fe82eaea4eb0.tar.bz2
Support for i1 XOR in FastISel. It is actually safe because
i1 operands are assumed to already by zero-extended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56615 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/SelectionDAG/FastISel.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp
index 254b1fe..dcb30ad 100644
--- a/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -135,10 +135,11 @@ bool FastISel::SelectBinaryOp(User *I, ISD::NodeType ISDOpcode) {
// under the assumption that i64 won't be used if the target doesn't
// support it.
if (!TLI.isTypeLegal(VT)) {
- // MVT::i1 is special. Allow AND and OR (but not XOR) because they
+ // MVT::i1 is special. Allow AND, OR, or XOR because they
// don't require additional zeroing, which makes them easy.
if (VT == MVT::i1 &&
- (ISDOpcode == ISD::AND || ISDOpcode == ISD::OR))
+ (ISDOpcode == ISD::AND || ISDOpcode == ISD::OR ||
+ ISDOpcode == ISD::XOR))
VT = TLI.getTypeToTransformTo(VT);
else
return false;