Home | History | Annotate | Download | only in InstCombine

Lines Matching refs:ZExt

163     C = ConstantExpr::getIntegerCast(C, Ty, isSigned /*Sext or ZExt*/);
192 case Instruction::ZExt:
201 // This also handles the case of zext(trunc(x)) -> zext(x).
406 case Instruction::ZExt:
470 // Transform trunc(lshr (zext A), Cst) to eliminate one type conversion.
506 /// transformZExtICmp - Transform (zext icmp) to bitwise / integer operations
510 // If we are just checking for a icmp eq of a single bit and zext'ing it
516 // zext (x <s 0) to i32 --> x>>u31 true if signbit set.
517 // zext (x >s -1) to i32 --> (x>>u31)^1 true if signbit clear.
527 In = Builder->CreateIntCast(In, CI.getType(), false/*ZExt*/);
537 // zext (X == 0) to i32 --> X^1 iff X has only the low bit set.
538 // zext (X == 0) to i32 --> (X>>1)^1 iff X has only the 2nd bit set.
539 // zext (X == 1) to i32 --> X iff X has only the low bit set.
540 // zext (X == 2) to i32 --> X>>1 iff X has only the 2nd bit set.
541 // zext (X != 0) to i32 --> X iff X has only the low bit set.
542 // zext (X != 0) to i32 --> X>>1 iff X has only the 2nd bit set.
543 // zext (X != 1) to i32 --> X^1 iff X has only the low bit set.
544 // zext (X != 2) to i32 --> (X>>1)^1 iff X has only the 2nd bit set.
583 return CastInst::CreateIntegerCast(In, CI.getType(), false/*ZExt*/);
641 /// %E = zext i32 %C to i64
669 case Instruction::ZExt: // zext(zext(x)) -> zext(x).
670 case Instruction::SExt: // zext(sext(x)) -> sext(x).
671 case Instruction::Trunc: // zext(trunc(x)) -> trunc(x) or zext(x)
759 // eliminated before we try to optimize this zext.
808 // If this is a TRUNC followed by a ZEXT then we are dealing with integral
821 // SrcSize < DstSize: zext(a & mask)
850 // zext (or icmp, icmp) --> or (zext icmp), (zext icmp) if at least one
851 // of the (zext icmp) will be transformed.
863 // zext(trunc(X) & C) -> (X & zext(C)).
871 // zext((trunc(X) & C) ^ C) -> ((X & zext(C)) ^ zext(C)).
880 // zext (xor i1 X, true) to i32 --> xor (zext i1 X to i32), 1
1007 case Instruction::ZExt: // sext(zext(x)) -> zext(x)
1061 // If we know that the value being extended is positive, we can use a zext
1066 Value *ZExt = Builder->CreateZExt(Src, DestTy);
1067 return ReplaceInstUsesWith(CI, ZExt);
1338 // fpto{s/u}i({u/s}itofp(X)) --> X or zext(X) or sext(X) or trunc(X)
1414 // trunc or zext to the intptr_t type, then inttoptr of it. This allows the
1460 // do a ptrtoint to intptr_t then do a trunc or zext. This allows the cast
1621 case Instruction::ZExt:
1653 /// %tmp38 = zext i32 %tmp37 to i64
1655 /// %tmp32 = zext i32 %tmp31 to i64
1805 // is a trunc or zext of a bitcast from vector. If so, we can replace all