mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-25 00:24:26 +00:00
Implement PR1822
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44318 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -7326,6 +7326,13 @@ Instruction *InstCombiner::visitSelectInst(SelectInst &SI) {
|
||||
return BinaryOperator::createOr(NotCond, TrueVal);
|
||||
}
|
||||
}
|
||||
|
||||
// select a, b, a -> a&b
|
||||
// select a, a, b -> a|b
|
||||
if (CondVal == TrueVal)
|
||||
return BinaryOperator::createOr(CondVal, FalseVal);
|
||||
else if (CondVal == FalseVal)
|
||||
return BinaryOperator::createAnd(CondVal, TrueVal);
|
||||
}
|
||||
|
||||
// Selecting between two integer constants?
|
||||
|
Reference in New Issue
Block a user