forked from OSchip/llvm-project
parent
e3da2980ad
commit
e80124df80
|
|
@ -204,8 +204,8 @@ static bool PeepholeOptimize(BasicBlock *BB, BasicBlock::iterator &BI) {
|
||||||
if (!isReinterpretingCast(CI)) {
|
if (!isReinterpretingCast(CI)) {
|
||||||
ValueTypeCache ConvertedTypes;
|
ValueTypeCache ConvertedTypes;
|
||||||
|
|
||||||
// Check to see if we can convert the users of the cast value to match the
|
// Check to see if we can convert the source of the cast to match the
|
||||||
// source type of the cast...
|
// destination type of the cast...
|
||||||
//
|
//
|
||||||
ConvertedTypes[CI] = CI->getType(); // Make sure the cast doesn't change
|
ConvertedTypes[CI] = CI->getType(); // Make sure the cast doesn't change
|
||||||
if (ExpressionConvertableToType(Src, DestTy, ConvertedTypes)) {
|
if (ExpressionConvertableToType(Src, DestTy, ConvertedTypes)) {
|
||||||
|
|
@ -224,8 +224,8 @@ static bool PeepholeOptimize(BasicBlock *BB, BasicBlock::iterator &BI) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check to see if we can convert the source of the cast to match the
|
// Check to see if we can convert the users of the cast value to match the
|
||||||
// destination type of the cast...
|
// source type of the cast...
|
||||||
//
|
//
|
||||||
ConvertedTypes.clear();
|
ConvertedTypes.clear();
|
||||||
if (ValueConvertableToType(CI, Src->getType(), ConvertedTypes)) {
|
if (ValueConvertableToType(CI, Src->getType(), ConvertedTypes)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue