aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprScalar.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-05-19 18:44:53 +0000
committerAnders Carlsson <andersca@mac.com>2009-05-19 18:44:53 +0000
commit9f84d88a302ea38cf0695ce8cdace47178d2fff4 (patch)
treebca7e17e0b56d41e20f65c84dfeb7c1faf53fe2b /lib/CodeGen/CGExprScalar.cpp
parentd66f22d9f8423579322a6dd16587ed52b0a58834 (diff)
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
Diffstat (limited to 'lib/CodeGen/CGExprScalar.cpp')
-rw-r--r--lib/CodeGen/CGExprScalar.cpp4
1 files 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