search for: tmp215

Displaying 1 result from an estimated 1 matches for "tmp215".

Did you mean: tmp15
2008 Jun 11
4
[LLVMdev] Query on optimization and tail call.
Hi, While playing around on the LLVM, I tried this code: int sum(int n) { if (n == 0) return 0; else return n + sum(n-1); } and this is what "llvm-gcc -O2" gave me: define i32 @sum(i32 %n) nounwind { entry: %tmp215 = icmp eq i32 %n, 0 ; <i1> [#uses=1] br i1 %tmp215, label %bb10, label %tailrecurse.bb10_crit_edge tailrecurse.bb10_crit_edge: ; preds = %entry %tmp = add i32 %n, -1 ; <i32> [#uses=3] %tmp17 = mul i32 %tmp, %tmp ; <i32> [#uses=1] %tmp18 = add i32 %tmp17, %n ; <i32>...