[llvm-commits] [llvm] r94281 - /llvm/trunk/lib/VMCore/Instructions.cpp
Chris Lattner
sabre at nondot.org
Fri Jan 22 20:42:42 PST 2010
Author: lattner
Date: Fri Jan 22 22:42:42 2010
New Revision: 94281
URL: http://llvm.org/viewvc/llvm-project?rev=94281&view=rev
Log:
simplify code a bit.
Modified:
llvm/trunk/lib/VMCore/Instructions.cpp
Modified: llvm/trunk/lib/VMCore/Instructions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Instructions.cpp?rev=94281&r1=94280&r2=94281&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Instructions.cpp (original)
+++ llvm/trunk/lib/VMCore/Instructions.cpp Fri Jan 22 22:42:42 2010
@@ -2080,25 +2080,25 @@
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;
More information about the llvm-commits
mailing list