mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-16 08:27:21 +00:00
clarify logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86689 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8781416858
commit
6b583919d9
@ -8261,10 +8261,10 @@ Instruction *InstCombiner::commonIntCastTransforms(CastInst &CI) {
|
||||
// Only do this if the dest type is a simple type, don't convert the
|
||||
// expression tree to something weird like i93 unless the source is also
|
||||
// strange.
|
||||
if (!isa<IntegerType>(SrcI->getType()) ||
|
||||
(ShouldChangeType(SrcI->getType(), DestTy, TD) &&
|
||||
if ((isa<VectorType>(DestTy) ||
|
||||
ShouldChangeType(SrcI->getType(), DestTy, TD)) &&
|
||||
CanEvaluateInDifferentType(SrcI, DestTy,
|
||||
CI.getOpcode(), NumCastsRemoved))) {
|
||||
CI.getOpcode(), NumCastsRemoved)) {
|
||||
// If this cast is a truncate, evaluting in a different type always
|
||||
// eliminates the cast, so it is always a win. If this is a zero-extension,
|
||||
// we need to do an AND to maintain the clear top-part of the computation,
|
||||
|
Loading…
Reference in New Issue
Block a user