Update call to CastInst::getCastOpcode for its new signature.
authorReid Spencer <rspencer@reidspencer.com>
Mon, 4 Dec 2006 02:48:01 +0000 (02:48 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Mon, 4 Dec 2006 02:48:01 +0000 (02:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32166 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/InstructionCombining.cpp

index adcd339f271c9dc5b2f7e7a977d8f970914eb59a..fac659f39b84c96837663cb312088f8d6b4a7af3 100644 (file)
@@ -388,7 +388,8 @@ static bool ValueRequiresCast(const Value *V, const Type *Ty, TargetData *TD) {
 
   // If this is another cast that can be eliminated, it isn't codegen either.
   if (const CastInst *CI = dyn_cast<CastInst>(V))
-    if (isEliminableCastPair(CI, CastInst::getCastOpcode(V, Ty), Ty, TD)) 
+    if (isEliminableCastPair(CI, CastInst::getCastOpcode(
+            V, V->getType()->isSigned(), Ty, Ty->isSigned()), Ty, TD)) 
       return false;
   return true;
 }