summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
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
commit775640d24847323639a99ea34643a05ffac6c247 (patch)
treeed688da6e02e2c36c00ed587b5080176a5017a3e /clang/lib/CodeGen
parent840e3281fff148d86c1850f398d4c5543e62a049 (diff)
downloadbcm5719-llvm-775640d24847323639a99ea34643a05ffac6c247.tar.gz
bcm5719-llvm-775640d24847323639a99ea34643a05ffac6c247.zip
Don't always zext the result of the not unary operator to an int.
llvm-svn: 72117
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGExprScalar.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp
index 6ceb2a67900..05573d6aec3 100644
--- a/clang/lib/CodeGen/CGExprScalar.cpp
+++ b/clang/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
OpenPOWER on IntegriCloud