summaryrefslogtreecommitdiff
path: root/docs/tutorial
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
parentfbbee8d7f967b72c5ec3105ef1b21e8a115a8b78 (diff)
downloadllvm-a9445e11c553855a6caacbbbf77a9b993ecc651e.tar.gz
llvm-a9445e11c553855a6caacbbbf77a9b993ecc651e.tar.bz2
llvm-a9445e11c553855a6caacbbbf77a9b993ecc651e.tar.xz
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')
-rw-r--r--docs/tutorial/LangImpl3.html30
-rw-r--r--docs/tutorial/LangImpl4.html26
-rw-r--r--docs/tutorial/LangImpl5.html2
-rw-r--r--docs/tutorial/LangImpl7.html18
-rw-r--r--docs/tutorial/OCamlLangImpl3.html32
-rw-r--r--docs/tutorial/OCamlLangImpl4.html26
-rw-r--r--docs/tutorial/OCamlLangImpl5.html2
-rw-r--r--docs/tutorial/OCamlLangImpl7.html18
8 files changed, 77 insertions, 77 deletions
diff --git a/docs/tutorial/LangImpl3.html b/docs/tutorial/LangImpl3.html
index 846a55f47f..fe28d41e67 100644
--- a/docs/tutorial/LangImpl3.html
+++ b/docs/tutorial/LangImpl3.html
@@ -554,12 +554,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>
@@ -576,7 +576,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>
@@ -612,18 +612,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
}
@@ -631,7 +631,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
}
diff --git a/docs/tutorial/LangImpl4.html b/docs/tutorial/LangImpl4.html
index 70fd673d64..230e6e5dc5 100644
--- a/docs/tutorial/LangImpl4.html
+++ b/docs/tutorial/LangImpl4.html
@@ -65,7 +65,7 @@ ready&gt; <b>def test(x) 1+2+x;</b>
Read function definition:
define double @test(double %x) {
entry:
- %addtmp = add double 3.000000e+00, %x
+ %addtmp = fadd double 3.000000e+00, %x
ret double %addtmp
}
</pre>
@@ -80,8 +80,8 @@ ready&gt; <b>def test(x) 1+2+x;</b>
Read function definition:
define double @test(double %x) {
entry:
- %addtmp = add double 2.000000e+00, 1.000000e+00
- %addtmp1 = add double %addtmp, %x
+ %addtmp = fadd double 2.000000e+00, 1.000000e+00
+ %addtmp1 = fadd double %addtmp, %x
ret double %addtmp1
}
</pre>
@@ -113,9 +113,9 @@ ready&gt; <b>def test(x) (1+2+x)*(x+(1+2));</b>
ready> Read function definition:
define double @test(double %x) {
entry:
- %addtmp = add double 3.000000e+00, %x
- %addtmp1 = add double %x, 3.000000e+00
- %multmp = mul double %addtmp, %addtmp1
+ %addtmp = fadd double 3.000000e+00, %x
+ %addtmp1 = fadd double %x, 3.000000e+00
+ %multmp = fmul double %addtmp, %addtmp1
ret double %multmp
}
</pre>
@@ -240,8 +240,8 @@ ready&gt; <b>def test(x) (1+2+x)*(x+(1+2));</b>
ready> Read function definition:
define double @test(double %x) {
entry:
- %addtmp = add double %x, 3.000000e+00
- %multmp = mul double %addtmp, %addtmp
+ %addtmp = fadd double %x, 3.000000e+00
+ %multmp = fmul double %addtmp, %addtmp
ret double %multmp
}
</pre>
@@ -363,8 +363,8 @@ ready&gt; <b>def testfunc(x y) x + y*2; </b>
Read function definition:
define double @testfunc(double %x, double %y) {
entry:
- %multmp = mul double %y, 2.000000e+00
- %addtmp = add double %multmp, %x
+ %multmp = fmul double %y, 2.000000e+00
+ %addtmp = fadd double %multmp, %x
ret double %addtmp
}
@@ -411,10 +411,10 @@ Read function definition:
define double @foo(double %x) {
entry:
%calltmp = call double @sin( double %x )
- %multmp = mul double %calltmp, %calltmp
+ %multmp = fmul double %calltmp, %calltmp
%calltmp2 = call double @cos( double %x )
- %multmp4 = mul double %calltmp2, %calltmp2
- %addtmp = add double %multmp, %multmp4
+ %multmp4 = fmul double %calltmp2, %calltmp2
+ %addtmp = fadd double %multmp, %multmp4
ret double %addtmp
}
diff --git a/docs/tutorial/LangImpl5.html b/docs/tutorial/LangImpl5.html
index 2b0450fef9..7136351bbb 100644
--- a/docs/tutorial/LangImpl5.html
+++ b/docs/tutorial/LangImpl5.html
@@ -678,7 +678,7 @@ loop: ; preds = %loop, %entry
; body
%calltmp = call double @putchard( double 4.200000e+01 )
; increment
- %nextvar = add double %i, 1.000000e+00
+ %nextvar = fadd double %i, 1.000000e+00
; termination test
%cmptmp = fcmp ult double %i, %n
diff --git a/docs/tutorial/LangImpl7.html b/docs/tutorial/LangImpl7.html
index f0a03c3cc8..0b46ba58ec 100644
--- a/docs/tutorial/LangImpl7.html
+++ b/docs/tutorial/LangImpl7.html
@@ -557,12 +557,12 @@ then: ; preds = %entry
else: ; preds = %entry
<b>%x3 = load double* %x1</b>
- %subtmp = sub double %x3, 1.000000e+00
+ %subtmp = fsub double %x3, 1.000000e+00
%calltmp = call double @fib( double %subtmp )
<b>%x4 = load double* %x1</b>
- %subtmp5 = sub double %x4, 2.000000e+00
+ %subtmp5 = fsub double %x4, 2.000000e+00
%calltmp6 = call double @fib( double %subtmp5 )
- %addtmp = add double %calltmp, %calltmp6
+ %addtmp = fadd double %calltmp, %calltmp6
br label %ifcont
ifcont: ; preds = %else, %then
@@ -595,11 +595,11 @@ then:
br label %ifcont
else:
- %subtmp = sub double <b>%x</b>, 1.000000e+00
+ %subtmp = fsub double <b>%x</b>, 1.000000e+00
%calltmp = call double @fib( double %subtmp )
- %subtmp5 = sub double <b>%x</b>, 2.000000e+00
+ %subtmp5 = fsub double <b>%x</b>, 2.000000e+00
%calltmp6 = call double @fib( double %subtmp5 )
- %addtmp = add double %calltmp, %calltmp6
+ %addtmp = fadd double %calltmp, %calltmp6
br label %ifcont
ifcont: ; preds = %else, %then
@@ -625,11 +625,11 @@ entry:
br i1 %ifcond, label %else, label %ifcont
else:
- %subtmp = sub double %x, 1.000000e+00
+ %subtmp = fsub double %x, 1.000000e+00
%calltmp = call double @fib( double %subtmp )
- %subtmp5 = sub double %x, 2.000000e+00
+ %subtmp5 = fsub double %x, 2.000000e+00
%calltmp6 = call double @fib( double %subtmp5 )
- %addtmp = add double %calltmp, %calltmp6
+ %addtmp = fadd double %calltmp, %calltmp6
ret double %addtmp
ifcont:
diff --git a/docs/tutorial/OCamlLangImpl3.html b/docs/tutorial/OCamlLangImpl3.html
index f3814c8d10..0d69207db6 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
}
diff --git a/docs/tutorial/OCamlLangImpl4.html b/docs/tutorial/OCamlLangImpl4.html
index 534502d08c..1619920be2 100644
--- a/docs/tutorial/OCamlLangImpl4.html
+++ b/docs/tutorial/OCamlLangImpl4.html
@@ -72,8 +72,8 @@ ready&gt; <b>def test(x) 1+2+x;</b>
Read function definition:
define double @test(double %x) {
entry:
- %addtmp = add double 1.000000e+00, 2.000000e+00
- %addtmp1 = add double %addtmp, %x
+ %addtmp = fadd double 1.000000e+00, 2.000000e+00
+ %addtmp1 = fadd double %addtmp, %x
ret double %addtmp1
}
</pre>
@@ -104,7 +104,7 @@ ready&gt; <b>def test(x) 1+2+x;</b>
Read function definition:
define double @test(double %x) {
entry:
- %addtmp = add double 3.000000e+00, %x
+ %addtmp = fadd double 3.000000e+00, %x
ret double %addtmp
}
</pre>
@@ -127,9 +127,9 @@ ready&gt; <b>def test(x) (1+2+x)*(x+(1+2));</b>
ready&gt; Read function definition:
define double @test(double %x) {
entry:
- %addtmp = add double 3.000000e+00, %x
- %addtmp1 = add double %x, 3.000000e+00
- %multmp = mul double %addtmp, %addtmp1
+ %addtmp = fadd double 3.000000e+00, %x
+ %addtmp1 = fadd double %x, 3.000000e+00
+ %multmp = fmul double %addtmp, %addtmp1
ret double %multmp
}
</pre>
@@ -267,8 +267,8 @@ ready&gt; <b>def test(x) (1+2+x)*(x+(1+2));</b>
ready&gt; Read function definition:
define double @test(double %x) {
entry:
- %addtmp = add double %x, 3.000000e+00
- %multmp = mul double %addtmp, %addtmp
+ %addtmp = fadd double %x, 3.000000e+00
+ %multmp = fmul double %addtmp, %addtmp
ret double %multmp
}
</pre>
@@ -388,8 +388,8 @@ ready&gt; <b>def testfunc(x y) x + y*2; </b>
Read function definition:
define double @testfunc(double %x, double %y) {
entry:
- %multmp = mul double %y, 2.000000e+00
- %addtmp = add double %multmp, %x
+ %multmp = fmul double %y, 2.000000e+00
+ %addtmp = fadd double %multmp, %x
ret double %addtmp
}
@@ -436,10 +436,10 @@ Read function definition:
define double @foo(double %x) {
entry:
%calltmp = call double @sin( double %x )
- %multmp = mul double %calltmp, %calltmp
+ %multmp = fmul double %calltmp, %calltmp
%calltmp2 = call double @cos( double %x )
- %multmp4 = mul double %calltmp2, %calltmp2
- %addtmp = add double %multmp, %multmp4
+ %multmp4 = fmul double %calltmp2, %calltmp2
+ %addtmp = fadd double %multmp, %multmp4
ret double %addtmp
}
diff --git a/docs/tutorial/OCamlLangImpl5.html b/docs/tutorial/OCamlLangImpl5.html
index 01e125502c..3a8b7d2525 100644
--- a/docs/tutorial/OCamlLangImpl5.html
+++ b/docs/tutorial/OCamlLangImpl5.html
@@ -653,7 +653,7 @@ loop: ; preds = %loop, %entry
; body
%calltmp = call double @putchard( double 4.200000e+01 )
; increment
- %nextvar = add double %i, 1.000000e+00
+ %nextvar = fadd double %i, 1.000000e+00
; termination test
%cmptmp = fcmp ult double %i, %n
diff --git a/docs/tutorial/OCamlLangImpl7.html b/docs/tutorial/OCamlLangImpl7.html
index aff97c4b4f..6047ad38c7 100644
--- a/docs/tutorial/OCamlLangImpl7.html
+++ b/docs/tutorial/OCamlLangImpl7.html
@@ -581,12 +581,12 @@ then: ; preds = %entry
else: ; preds = %entry
<b>%x3 = load double* %x1</b>
- %subtmp = sub double %x3, 1.000000e+00
+ %subtmp = fsub double %x3, 1.000000e+00
%calltmp = call double @fib( double %subtmp )
<b>%x4 = load double* %x1</b>
- %subtmp5 = sub double %x4, 2.000000e+00
+ %subtmp5 = fsub double %x4, 2.000000e+00
%calltmp6 = call double @fib( double %subtmp5 )
- %addtmp = add double %calltmp, %calltmp6
+ %addtmp = fadd double %calltmp, %calltmp6
br label %ifcont
ifcont: ; preds = %else, %then
@@ -619,11 +619,11 @@ then:
br label %ifcont
else:
- %subtmp = sub double <b>%x</b>, 1.000000e+00
+ %subtmp = fsub double <b>%x</b>, 1.000000e+00
%calltmp = call double @fib( double %subtmp )
- %subtmp5 = sub double <b>%x</b>, 2.000000e+00
+ %subtmp5 = fsub double <b>%x</b>, 2.000000e+00
%calltmp6 = call double @fib( double %subtmp5 )
- %addtmp = add double %calltmp, %calltmp6
+ %addtmp = fadd double %calltmp, %calltmp6
br label %ifcont
ifcont: ; preds = %else, %then
@@ -649,11 +649,11 @@ entry:
br i1 %ifcond, label %else, label %ifcont
else:
- %subtmp = sub double %x, 1.000000e+00
+ %subtmp = fsub double %x, 1.000000e+00
%calltmp = call double @fib( double %subtmp )
- %subtmp5 = sub double %x, 2.000000e+00
+ %subtmp5 = fsub double %x, 2.000000e+00
%calltmp6 = call double @fib( double %subtmp5 )
- %addtmp = add double %calltmp, %calltmp6
+ %addtmp = fadd double %calltmp, %calltmp6
ret double %addtmp
ifcont: