mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-13 00:11:56 +00:00
Enable a couple xforms for packed vectors (undef | v) -> -1 for packed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32858 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e94d8b2f53
commit
7ce2f8b265
@ -700,9 +700,10 @@ void SCCPSolver::visitBinaryOperator(Instruction &I) {
|
|||||||
// Could annihilate value.
|
// Could annihilate value.
|
||||||
if (I.getOpcode() == Instruction::And)
|
if (I.getOpcode() == Instruction::And)
|
||||||
markConstant(IV, &I, Constant::getNullValue(I.getType()));
|
markConstant(IV, &I, Constant::getNullValue(I.getType()));
|
||||||
else if (Constant *Ones = ConstantInt::getAllOnesValue(I.getType())) {
|
else if (const PackedType *PT = dyn_cast<PackedType>(I.getType()))
|
||||||
markConstant(IV, &I, Ones);
|
markConstant(IV, &I, ConstantPacked::getAllOnesValue(PT));
|
||||||
}
|
else
|
||||||
|
markConstant(IV, &I, ConstantInt::getAllOnesValue(I.getType()));
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
if (I.getOpcode() == Instruction::And) {
|
if (I.getOpcode() == Instruction::And) {
|
||||||
@ -1233,11 +1234,11 @@ bool SCCPSolver::ResolvedUndefsIn(Function &F) {
|
|||||||
|
|
||||||
case Instruction::Or:
|
case Instruction::Or:
|
||||||
// undef | X -> -1. X could be -1.
|
// undef | X -> -1. X could be -1.
|
||||||
if (Constant *Ones = ConstantInt::getAllOnesValue(ITy)) {
|
if (const PackedType *PTy = dyn_cast<PackedType>(ITy))
|
||||||
markForcedConstant(LV, I, Ones);
|
markForcedConstant(LV, I, ConstantPacked::getAllOnesValue(PTy));
|
||||||
return true;
|
else
|
||||||
}
|
markForcedConstant(LV, I, ConstantInt::getAllOnesValue(ITy));
|
||||||
break;
|
return true;
|
||||||
|
|
||||||
case Instruction::SDiv:
|
case Instruction::SDiv:
|
||||||
case Instruction::UDiv:
|
case Instruction::UDiv:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user