[cfe-commits] r72117 - /cfe/trunk/lib/CodeGen/CGExprScalar.cpp

Anders Carlsson andersca at mac.com
Tue May 19 11:45:11 PDT 2009


Author: andersca
Date: Tue May 19 13:44:53 2009
New Revision: 72117

URL: http://llvm.org/viewvc/llvm-project?rev=72117&view=rev
Log:
Don't always zext the result of the not unary operator to an int.

Modified:
    cfe/trunk/lib/CodeGen/CGExprScalar.cpp

Modified: cfe/trunk/lib/CodeGen/CGExprScalar.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprScalar.cpp?rev=72117&r1=72116&r2=72117&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprScalar.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprScalar.cpp Tue May 19 13:44:53 2009
@@ -719,8 +719,8 @@
   // 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





More information about the cfe-commits mailing list