summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorVikram S. Adve <vadve@cs.uiuc.edu>2002-08-15 14:19:22 +0000
committerVikram S. Adve <vadve@cs.uiuc.edu>2002-08-15 14:19:22 +0000
commit3db97eb499134cd483e308524f4bd8a3d8143ae6 (patch)
treefc47b641f5b1579ea8c5f923a7d6d72ad118ef72 /llvm/lib
parentcaed2690851a6492733f0db24404728b6e3addf2 (diff)
downloadbcm5719-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.cpp9
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)
OpenPOWER on IntegriCloud