[llvm-commits] CVS: llvm/lib/CodeGen/IntrinsicLowering.cpp

Reid Spencer reid at x10sys.com
Sun Apr 1 18:02:07 PDT 2007



Changes in directory llvm/lib/CodeGen:

IntrinsicLowering.cpp updated: 1.73 -> 1.74
---
Log message:

For PR1297: http://llvm.org/PR1297 :
Make sure that the CTPOP result is casted to i32 as the bit counting 
intrinsics all return i32 now (this affects CTLZ and CTTZ as well).


---
Diffs of the changes:  (+1 -1)

 IntrinsicLowering.cpp |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/CodeGen/IntrinsicLowering.cpp
diff -u llvm/lib/CodeGen/IntrinsicLowering.cpp:1.73 llvm/lib/CodeGen/IntrinsicLowering.cpp:1.74
--- llvm/lib/CodeGen/IntrinsicLowering.cpp:1.73	Sun Apr  1 02:35:23 2007
+++ llvm/lib/CodeGen/IntrinsicLowering.cpp	Sun Apr  1 20:01:49 2007
@@ -218,7 +218,7 @@
     V = BinaryOperator::createAdd(LHS, RHS, "ctpop.step", IP);
   }
 
-  return V;
+  return CastInst::createIntegerCast(V, Type::Int32Ty, false, "ctpop", IP);
 }
 
 /// LowerCTLZ - Emit the code to lower ctlz of V before the specified






More information about the llvm-commits mailing list