mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-27 06:54:30 +00:00
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
This commit is contained in:
parent
5e22d4f669
commit
21b0deb4ab
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user