summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2009-11-16 12:32:28 +0000
committerDuncan Sands <baldrick@free.fr>2009-11-16 12:32:28 +0000
commite5de4a9ad6cd9443e1bd4c185c2da36f0f32ec45 (patch)
tree84d6a68da66f1bdd8507e2062c74d7c877f1b42c /llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
parent00e87d19f523837e24159ee2db3a6d2c4a249ed4 (diff)
downloadbcm5719-llvm-e5de4a9ad6cd9443e1bd4c185c2da36f0f32ec45.tar.gz
bcm5719-llvm-e5de4a9ad6cd9443e1bd4c185c2da36f0f32ec45.zip
CreateIntCast takes an "isSigned" parameter. Pass "true" for it, rather than
a name. llvm-svn: 88908
Diffstat (limited to 'llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp b/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
index 296f0c9ac54..611505ef363 100644
--- a/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
+++ b/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
@@ -259,6 +259,7 @@ Value *LibCallOptimization::EmitPutChar(Value *Char, IRBuilder<> &B) {
CallInst *CI = B.CreateCall(PutChar,
B.CreateIntCast(Char,
Type::getInt32Ty(*Context),
+ /*isSigned*/true,
"chari"),
"putchar");
@@ -303,7 +304,8 @@ void LibCallOptimization::EmitFPutC(Value *Char, Value *File, IRBuilder<> &B) {
Type::getInt32Ty(*Context),
Type::getInt32Ty(*Context),
File->getType(), NULL);
- Char = B.CreateIntCast(Char, Type::getInt32Ty(*Context), "chari");
+ Char = B.CreateIntCast(Char, Type::getInt32Ty(*Context), /*isSigned*/true,
+ "chari");
CallInst *CI = B.CreateCall2(F, Char, File, "fputc");
if (const Function *Fn = dyn_cast<Function>(F->stripPointerCasts()))
OpenPOWER on IntegriCloud