Home | History | Annotate | Download | only in InstCombine

Lines Matching defs:Trunc

191   case Instruction::Trunc:
201 // This also handles the case of zext(trunc(x)) -> zext(x).
328 /// Ty will always be a type smaller than V. We should return true if trunc(V)
330 /// then trunc(inst(x,y)) can be computed as inst(trunc(x),trunc(y)), which only
405 case Instruction::Trunc:
406 // trunc(trunc(x)) -> trunc(x)
410 // trunc(ext(x)) -> ext(x) if the source type is smaller than the new dest
411 // trunc(ext(x)) -> trunc(x) if the source type is larger than the new dest
464 // Canonicalize trunc x to i1 -> (icmp ne (and x, 1), 0), likewise for vector.
472 // Transform trunc(lshr (zext A), Cst) to eliminate one type conversion.
495 // Transform "trunc (and X, cst)" -> "and (trunc X), cst" so long as the dest
641 /// %B = trunc i64 %A to i32
672 case Instruction::Trunc: // zext(trunc(x)) -> trunc(x) or zext(x)
806 // If this is a TRUNC followed by a ZEXT then we are dealing with integral
821 // SrcSize > DstSize: trunc(a) & mask
835 Value *Trunc = Builder->CreateTrunc(A, CI.getType());
837 return BinaryOperator::CreateAnd(Trunc,
838 ConstantInt::get(Trunc->getType(),
861 // zext(trunc(t) & C) -> (t & zext(C)).
872 // zext((trunc(t) & C) ^ C) -> ((t & zext(C)) ^ zext(C)).
1023 case Instruction::Trunc: // sext(trunc(x)) -> trunc(x) or sext(x)
1102 // If this input is a trunc from our destination, then turn sext(trunc(x))
1123 // trunc and extend and just do shifts. For example, turn:
1124 // %a = trunc i32 %i to i8
1339 // trunc or zext to the intptr_t type, then inttoptr of it. This allows the
1407 // do a ptrtoint to intptr_t then do a trunc or zext. This allows the cast
1632 // bitcast(trunc(bitcast(somevector)))
1654 // bitcast(trunc(lshr(bitcast(somevector), cst))
1745 // is a trunc or zext of a bitcast from vector. If so, we can replace all