From 9f84d88a302ea38cf0695ce8cdace47178d2fff4 Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Tue, 19 May 2009 18:44:53 +0000 Subject: [PATCH] Don't always zext the result of the not unary operator to an int. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72117 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExprScalar.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index 6ceb2a6790..05573d6aec 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -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 -- 2.50.1