Dale Johannesen | 317096a | 2007-09-28 01:08:20 +0000 | [diff] [blame^] | 1 | ; RUN: llvm-as < %s | llc | grep powixf2 |
| 2 | ; RUN: llvm-as < %s | llc | grep fsqrt |
| 3 | ; ModuleID = 'yyy.c' |
| 4 | target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128" |
| 5 | target triple = "i686-apple-darwin8" |
| 6 | |
| 7 | define x86_fp80 @foo(x86_fp80 %x) { |
| 8 | entry: |
| 9 | %x_addr = alloca x86_fp80 ; <x86_fp80*> [#uses=2] |
| 10 | %retval = alloca x86_fp80 ; <x86_fp80*> [#uses=2] |
| 11 | %tmp = alloca x86_fp80 ; <x86_fp80*> [#uses=2] |
| 12 | %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0] |
| 13 | store x86_fp80 %x, x86_fp80* %x_addr |
| 14 | %tmp1 = load x86_fp80* %x_addr, align 16 ; <x86_fp80> [#uses=1] |
| 15 | %tmp2 = call x86_fp80 @llvm.sqrt.f80( x86_fp80 %tmp1 ) ; <x86_fp80> [#uses=1] |
| 16 | store x86_fp80 %tmp2, x86_fp80* %tmp, align 16 |
| 17 | %tmp3 = load x86_fp80* %tmp, align 16 ; <x86_fp80> [#uses=1] |
| 18 | store x86_fp80 %tmp3, x86_fp80* %retval, align 16 |
| 19 | br label %return |
| 20 | |
| 21 | return: ; preds = %entry |
| 22 | %retval4 = load x86_fp80* %retval ; <x86_fp80> [#uses=1] |
| 23 | ret x86_fp80 %retval4 |
| 24 | } |
| 25 | |
| 26 | declare x86_fp80 @llvm.sqrt.f80(x86_fp80) |
| 27 | |
| 28 | define x86_fp80 @bar(x86_fp80 %x) { |
| 29 | entry: |
| 30 | %x_addr = alloca x86_fp80 ; <x86_fp80*> [#uses=2] |
| 31 | %retval = alloca x86_fp80 ; <x86_fp80*> [#uses=2] |
| 32 | %tmp = alloca x86_fp80 ; <x86_fp80*> [#uses=2] |
| 33 | %"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0] |
| 34 | store x86_fp80 %x, x86_fp80* %x_addr |
| 35 | %tmp1 = load x86_fp80* %x_addr, align 16 ; <x86_fp80> [#uses=1] |
| 36 | %tmp2 = call x86_fp80 @llvm.powi.f80( x86_fp80 %tmp1, i32 3 ) ; <x86_fp80> [#uses=1] |
| 37 | store x86_fp80 %tmp2, x86_fp80* %tmp, align 16 |
| 38 | %tmp3 = load x86_fp80* %tmp, align 16 ; <x86_fp80> [#uses=1] |
| 39 | store x86_fp80 %tmp3, x86_fp80* %retval, align 16 |
| 40 | br label %return |
| 41 | |
| 42 | return: ; preds = %entry |
| 43 | %retval4 = load x86_fp80* %retval ; <x86_fp80> [#uses=1] |
| 44 | ret x86_fp80 %retval4 |
| 45 | } |
| 46 | |
| 47 | declare x86_fp80 @llvm.powi.f80(x86_fp80, i32) |