diff options
| author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2002-08-15 14:19:22 +0000 |
|---|---|---|
| committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2002-08-15 14:19:22 +0000 |
| commit | 3db97eb499134cd483e308524f4bd8a3d8143ae6 (patch) | |
| tree | fc47b641f5b1579ea8c5f923a7d6d72ad118ef72 /llvm/lib | |
| parent | caed2690851a6492733f0db24404728b6e3addf2 (diff) | |
| download | bcm5719-llvm-3db97eb499134cd483e308524f4bd8a3d8143ae6.tar.gz bcm5719-llvm-3db97eb499134cd483e308524f4bd8a3d8143ae6.zip | |
Unary Not (boolean and bitwise) is no longer a separate LLVM instruction
but is instead implemented with XOR. Note that the InstrForest opLabels
for Not and BNot remain the same, i.e., the XOR is recognized and
represented as a (boolean or bitwise) Not when building the instruction
trees. But these tree nodes are now binary, not unary.
llvm-svn: 3343
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CodeGen/InstrSelection/InstrForest.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/InstrSelection/InstrForest.cpp b/llvm/lib/CodeGen/InstrSelection/InstrForest.cpp index d7edf1575b3..c24c35b640b 100644 --- a/llvm/lib/CodeGen/InstrSelection/InstrForest.cpp +++ b/llvm/lib/CodeGen/InstrSelection/InstrForest.cpp @@ -73,10 +73,15 @@ InstructionNode::InstructionNode(Instruction* I) { opLabel = opLabel + 100; // load/getElem with index vector } + else if (opLabel == Instruction::Xor && + BinaryOperator::isNot(I)) + { + opLabel = (I->getType() == Type::BoolTy)? NotOp // boolean Not operator + : BNotOp; // bitwise Not operator + } else if (opLabel == Instruction::And || opLabel == Instruction::Or || - opLabel == Instruction::Xor || - opLabel == Instruction::Not) + opLabel == Instruction::Xor) { // Distinguish bitwise operators from logical operators! if (I->getType() != Type::BoolTy) |

