aboutsummaryrefslogtreecommitdiffstats
path: root/docs/tutorial/OCamlLangImpl3.html
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-03-02 01:11:08 +0000
committerDan Gohman <gohman@apple.com>2010-03-02 01:11:08 +0000
commita9445e11c553855a6caacbbbf77a9b993ecc651e (patch)
tree6bc8ec7754c19ad16540ade4132afb5e6fb1b185 /docs/tutorial/OCamlLangImpl3.html
parentfbbee8d7f967b72c5ec3105ef1b21e8a115a8b78 (diff)
downloadexternal_llvm-a9445e11c553855a6caacbbbf77a9b993ecc651e.zip
external_llvm-a9445e11c553855a6caacbbbf77a9b993ecc651e.tar.gz
external_llvm-a9445e11c553855a6caacbbbf77a9b993ecc651e.tar.bz2
Floating-point add, sub, and mul are now spelled fadd, fsub, and fmul,
respectively. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97531 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/tutorial/OCamlLangImpl3.html')
-rw-r--r--docs/tutorial/OCamlLangImpl3.html32
1 files changed, 16 insertions, 16 deletions
diff --git a/docs/tutorial/OCamlLangImpl3.html b/docs/tutorial/OCamlLangImpl3.html
index f3814c8..0d69207 100644
--- a/docs/tutorial/OCamlLangImpl3.html
+++ b/docs/tutorial/OCamlLangImpl3.html
@@ -484,7 +484,7 @@ ready&gt; <b>4+5</b>;
Read top-level expression:
define double @""() {
entry:
- %addtmp = add double 4.000000e+00, 5.000000e+00
+ %addtmp = fadd double 4.000000e+00, 5.000000e+00
ret double %addtmp
}
</pre>
@@ -503,12 +503,12 @@ ready&gt; <b>def foo(a b) a*a + 2*a*b + b*b;</b>
Read function definition:
define double @foo(double %a, double %b) {
entry:
- %multmp = mul double %a, %a
- %multmp1 = mul double 2.000000e+00, %a
- %multmp2 = mul double %multmp1, %b
- %addtmp = add double %multmp, %multmp2
- %multmp3 = mul double %b, %b
- %addtmp4 = add double %addtmp, %multmp3
+ %multmp = fmul double %a, %a
+ %multmp1 = fmul double 2.000000e+00, %a
+ %multmp2 = fmul double %multmp1, %b
+ %addtmp = fadd double %multmp, %multmp2
+ %multmp3 = fmul double %b, %b
+ %addtmp4 = fadd double %addtmp, %multmp3
ret double %addtmp4
}
</pre>
@@ -525,7 +525,7 @@ define double @bar(double %a) {
entry:
%calltmp = call double @foo( double %a, double 4.000000e+00 )
%calltmp1 = call double @bar( double 3.133700e+04 )
- %addtmp = add double %calltmp, %calltmp1
+ %addtmp = fadd double %calltmp, %calltmp1
ret double %addtmp
}
</pre>
@@ -561,18 +561,18 @@ ready&gt; <b>^D</b>
define double @""() {
entry:
- %addtmp = add double 4.000000e+00, 5.000000e+00
+ %addtmp = fadd double 4.000000e+00, 5.000000e+00
ret double %addtmp
}
define double @foo(double %a, double %b) {
entry:
- %multmp = mul double %a, %a
- %multmp1 = mul double 2.000000e+00, %a
- %multmp2 = mul double %multmp1, %b
- %addtmp = add double %multmp, %multmp2
- %multmp3 = mul double %b, %b
- %addtmp4 = add double %addtmp, %multmp3
+ %multmp = fmul double %a, %a
+ %multmp1 = fmul double 2.000000e+00, %a
+ %multmp2 = fmul double %multmp1, %b
+ %addtmp = fadd double %multmp, %multmp2
+ %multmp3 = fmul double %b, %b
+ %addtmp4 = fadd double %addtmp, %multmp3
ret double %addtmp4
}
@@ -580,7 +580,7 @@ define double @bar(double %a) {
entry:
%calltmp = call double @foo( double %a, double 4.000000e+00 )
%calltmp1 = call double @bar( double 3.133700e+04 )
- %addtmp = add double %calltmp, %calltmp1
+ %addtmp = fadd double %calltmp, %calltmp1
ret double %addtmp
}