[llvm-commits] CVS: llvm/examples/Fibonacci/fibonacci.cpp

Reid Spencer reid at x10sys.com
Fri Dec 22 22:06:56 PST 2006



Changes in directory llvm/examples/Fibonacci:

fibonacci.cpp updated: 1.12 -> 1.13
---
Log message:

For PR950: http://llvm.org/PR950 :
This patch removes the SetCC instructions and replaces them with the ICmp
and FCmp instructions. The SetCondInst instruction has been removed and 
been replaced with ICmpInst and FCmpInst.


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

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


Index: llvm/examples/Fibonacci/fibonacci.cpp
diff -u llvm/examples/Fibonacci/fibonacci.cpp:1.12 llvm/examples/Fibonacci/fibonacci.cpp:1.13
--- llvm/examples/Fibonacci/fibonacci.cpp:1.12	Fri Oct 20 02:07:23 2006
+++ llvm/examples/Fibonacci/fibonacci.cpp	Sat Dec 23 00:05:40 2006
@@ -58,7 +58,7 @@
   BasicBlock* RecurseBB = new BasicBlock("recurse", FibF);
 
   // Create the "if (arg < 2) goto exitbb"
-  Value *CondInst = BinaryOperator::createSetLE(ArgX, Two, "cond", BB);
+  Value *CondInst = new ICmpInst(ICmpInst::ICMP_SLE, ArgX, Two, "cond", BB);
   new BranchInst(RetBB, RecurseBB, CondInst, BB);
 
   // Create: ret int 1






More information about the llvm-commits mailing list