Can't make these fail now with just BitCast. Previous failures must have
authorReid Spencer <rspencer@reidspencer.com>
Tue, 5 Dec 2006 07:18:07 +0000 (07:18 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Tue, 5 Dec 2006 07:18:07 +0000 (07:18 +0000)
been in conjunction with something else. By right, they should just be
BitCasts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32219 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/ConstantFold.cpp

index 58f1d444f67661ab5a40ab8edf29c2ac92a84a10..4a274a71d40d37adc5d103b4d068ba11962147b8 100644 (file)
@@ -777,7 +777,7 @@ static Constant *CastConstantPacked(ConstantPacked *CP,
         uint64_t V =
           DoubleToBits(cast<ConstantFP>(CP->getOperand(i))->getValue());
         Constant *C = ConstantInt::get(Type::ULongTy, V);
-        Result.push_back(ConstantExpr::getTruncOrBitCast(C, DstEltTy ));
+        Result.push_back(ConstantExpr::getBitCast(C, DstEltTy ));
       }
       return ConstantPacked::get(Result);
     }
@@ -786,7 +786,7 @@ static Constant *CastConstantPacked(ConstantPacked *CP,
     for (unsigned i = 0; i != SrcNumElts; ++i) {
       uint32_t V = FloatToBits(cast<ConstantFP>(CP->getOperand(i))->getValue());
       Constant *C = ConstantInt::get(Type::UIntTy, V);
-      Result.push_back(ConstantExpr::getTruncOrBitCast(C, DstEltTy));
+      Result.push_back(ConstantExpr::getBitCast(C, DstEltTy));
     }
     return ConstantPacked::get(Result);
   }