diff options
author | Dan Gohman <gohman@apple.com> | 2010-03-02 01:11:08 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-03-02 01:11:08 +0000 |
commit | a9445e11c553855a6caacbbbf77a9b993ecc651e (patch) | |
tree | 6bc8ec7754c19ad16540ade4132afb5e6fb1b185 /docs/tutorial/LangImpl3.html | |
parent | fbbee8d7f967b72c5ec3105ef1b21e8a115a8b78 (diff) |
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/LangImpl3.html')
-rw-r--r-- | docs/tutorial/LangImpl3.html | 30 |
1 files changed, 15 insertions, 15 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> <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> <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 } |