[llvm-commits] CVS: llvm/tools/bugpoint/ExtractFunction.cpp Miscompilation.cpp
Reid Spencer
reid at x10sys.com
Sun Nov 26 17:06:23 PST 2006
Changes in directory llvm/tools/bugpoint:
ExtractFunction.cpp updated: 1.54 -> 1.55
Miscompilation.cpp updated: 1.80 -> 1.81
---
Log message:
For PR950: http://llvm.org/PR950 :
The long awaited CAST patch. This introduces 12 new instructions into LLVM
to replace the cast instruction. Corresponding changes throughout LLVM are
provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the
exception of 175.vpr which fails only on a slight floating point output
difference.
---
Diffs of the changes: (+4 -4)
ExtractFunction.cpp | 2 +-
Miscompilation.cpp | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
Index: llvm/tools/bugpoint/ExtractFunction.cpp
diff -u llvm/tools/bugpoint/ExtractFunction.cpp:1.54 llvm/tools/bugpoint/ExtractFunction.cpp:1.55
--- llvm/tools/bugpoint/ExtractFunction.cpp:1.54 Thu Nov 9 00:24:56 2006
+++ llvm/tools/bugpoint/ExtractFunction.cpp Sun Nov 26 19:05:10 2006
@@ -214,7 +214,7 @@
Constant *FP = CS->getOperand(1);
if (ConstantExpr *CE = dyn_cast<ConstantExpr>(FP))
- if (CE->getOpcode() == Instruction::Cast)
+ if (CE->isCast())
FP = CE->getOperand(0);
if (Function *F = dyn_cast<Function>(FP)) {
if (!F->isExternal())
Index: llvm/tools/bugpoint/Miscompilation.cpp
diff -u llvm/tools/bugpoint/Miscompilation.cpp:1.80 llvm/tools/bugpoint/Miscompilation.cpp:1.81
--- llvm/tools/bugpoint/Miscompilation.cpp:1.80 Sat Nov 11 13:59:25 2006
+++ llvm/tools/bugpoint/Miscompilation.cpp Sun Nov 26 19:05:10 2006
@@ -734,9 +734,9 @@
CallInst *Resolver = new CallInst(resolverFunc, ResolverArgs,
"resolver", LookupBB);
// cast the result from the resolver to correctly-typed function
- CastInst *CastedResolver =
- new CastInst(Resolver, PointerType::get(F->getFunctionType()),
- "resolverCast", LookupBB);
+ CastInst *CastedResolver = new BitCastInst(Resolver,
+ PointerType::get(F->getFunctionType()), "resolverCast", LookupBB);
+
// Save the value in our cache.
new StoreInst(CastedResolver, Cache, LookupBB);
new BranchInst(DoCallBB, LookupBB);
More information about the llvm-commits
mailing list