diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-23 04:42:42 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-23 04:42:42 +0000 |
commit | 33b1758e16f050c79fd7d93a04e3ef7aa2971b0c (patch) | |
tree | c3765e61d63b965fe012df252a137ccaef47e48e /lib/VMCore/Instructions.cpp | |
parent | e4a0a151a5164c3dfc7bc4d6a92d57e934a88213 (diff) |
simplify code a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94281 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Instructions.cpp')
-rw-r--r-- | lib/VMCore/Instructions.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp index e72e48cb1a..e2b920e6f5 100644 --- a/lib/VMCore/Instructions.cpp +++ b/lib/VMCore/Instructions.cpp @@ -2080,25 +2080,25 @@ unsigned CastInst::isEliminableCastPair( case 3: // no-op cast in second op implies firstOp as long as the DestTy // is integer and we are not converting between a vector and a - // non vector type - if (SrcTy->getTypeID() != Type::VectorTyID && DstTy->isInteger()) + // non vector type. + if (!isa<VectorType>(SrcTy) && DstTy->isInteger()) return firstOp; return 0; case 4: // no-op cast in second op implies firstOp as long as the DestTy - // is floating point + // is floating point. if (DstTy->isFloatingPoint()) return firstOp; return 0; case 5: // no-op cast in first op implies secondOp as long as the SrcTy - // is an integer + // is an integer. if (SrcTy->isInteger()) return secondOp; return 0; case 6: // no-op cast in first op implies secondOp as long as the SrcTy - // is a floating point + // is a floating point. if (SrcTy->isFloatingPoint()) return secondOp; return 0; |