mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-20 19:42:54 +02:00
Hack unneccesary now that shifts of pointers are no longer legal!
llvm-svn: 3640
This commit is contained in:
parent
ab8acf3d00
commit
4f5abce7f6
@ -492,7 +492,6 @@ Instruction *InstCombiner::visitShiftInst(Instruction &I) {
|
|||||||
if (ConstantUInt *CUI = dyn_cast<ConstantUInt>(Op1)) {
|
if (ConstantUInt *CUI = dyn_cast<ConstantUInt>(Op1)) {
|
||||||
unsigned TypeBits = Op0->getType()->getPrimitiveSize()*8;
|
unsigned TypeBits = Op0->getType()->getPrimitiveSize()*8;
|
||||||
if (CUI->getValue() >= TypeBits &&
|
if (CUI->getValue() >= TypeBits &&
|
||||||
TypeBits && // FIXME: Handle pointer operands here. This should go away
|
|
||||||
!(Op0->getType()->isSigned() && I.getOpcode() == Instruction::Shr))
|
!(Op0->getType()->isSigned() && I.getOpcode() == Instruction::Shr))
|
||||||
return ReplaceInstUsesWith(I, Constant::getNullValue(Op0->getType()));
|
return ReplaceInstUsesWith(I, Constant::getNullValue(Op0->getType()));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user