mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 23:17:16 +00:00
Remove some dead code and tidy things up now that vectors use ConstantDataVector
instead of always using ConstantVector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149912 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -495,10 +495,8 @@ Value *InstCombiner::dyn_castNegVal(Value *V) const {
|
||||
if (ConstantInt *C = dyn_cast<ConstantInt>(V))
|
||||
return ConstantExpr::getNeg(C);
|
||||
|
||||
if (Constant *C = dyn_cast<Constant>(V))
|
||||
// FIXME: Remove ConstantVector
|
||||
if ((isa<ConstantVector>(C) || isa<ConstantDataVector>(C)) &&
|
||||
C->getType()->getVectorElementType()->isIntegerTy())
|
||||
if (ConstantDataVector *C = dyn_cast<ConstantDataVector>(V))
|
||||
if (C->getType()->getElementType()->isIntegerTy())
|
||||
return ConstantExpr::getNeg(C);
|
||||
|
||||
return 0;
|
||||
@@ -516,10 +514,8 @@ Value *InstCombiner::dyn_castFNegVal(Value *V) const {
|
||||
if (ConstantFP *C = dyn_cast<ConstantFP>(V))
|
||||
return ConstantExpr::getFNeg(C);
|
||||
|
||||
if (Constant *C = dyn_cast<Constant>(V))
|
||||
// FIXME: Remove ConstantVector
|
||||
if ((isa<ConstantVector>(C) || isa<ConstantDataVector>(C)) &&
|
||||
C->getType()->getVectorElementType()->isFloatingPointTy())
|
||||
if (ConstantDataVector *C = dyn_cast<ConstantDataVector>(V))
|
||||
if (C->getType()->getElementType()->isFloatingPointTy())
|
||||
return ConstantExpr::getFNeg(C);
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user