Don't always zext the result of the not unary operator to an int.

llvm-svn: 72117
This commit is contained in:
Anders Carlsson 2009-05-19 18:44:53 +00:00
parent 840e3281ff
commit 775640d248
1 changed files with 2 additions and 2 deletions

View File

@ -719,8 +719,8 @@ Value *ScalarExprEmitter::VisitUnaryLNot(const UnaryOperator *E) {
// the operand is an icmp ne, turn into icmp eq.
BoolVal = Builder.CreateNot(BoolVal, "lnot");
// ZExt result to int.
return Builder.CreateZExt(BoolVal, CGF.LLVMIntTy, "lnot.ext");
// ZExt result to the expr type.
return Builder.CreateZExt(BoolVal, ConvertType(E->getType()), "lnot.ext");
}
/// VisitSizeOfAlignOfExpr - Return the size or alignment of the type of