|
1 |
| -; RUN: llc < %s -mcpu=i486 | grep fstpl | count 5 |
2 |
| -; RUN: llc < %s -mcpu=i486 | grep fstps | count 2 |
| 1 | +; RUN: llc < %s -mcpu=i486 | FileCheck %s |
3 | 2 | ; PR1505
|
4 | 3 |
|
5 | 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"
|
@@ -30,19 +29,41 @@ declare void @_ZNSt8ios_base4InitC1Ev(%"struct.std::ctype_base"*)
|
30 | 29 |
|
31 | 30 | declare i32 @__cxa_atexit(void (i8*)*, i8*, i8*)
|
32 | 31 |
|
| 32 | +; CHECK: main |
33 | 33 | define i32 @main() {
|
34 | 34 | entry:
|
| 35 | +; CHECK: flds |
35 | 36 | %tmp6 = volatile load float* @a ; <float> [#uses=1]
|
| 37 | +; CHECK: fstps (%esp) |
| 38 | +; CHECK: tanf |
36 | 39 | %tmp9 = tail call float @tanf( float %tmp6 ) ; <float> [#uses=1]
|
| 40 | +; Spill returned value: |
| 41 | +; CHECK: fstp |
| 42 | + |
| 43 | +; CHECK: fldl |
37 | 44 | %tmp12 = volatile load double* @b ; <double> [#uses=1]
|
| 45 | +; CHECK: fstpl (%esp) |
| 46 | +; CHECK: tan |
38 | 47 | %tmp13 = tail call double @tan( double %tmp12 ) ; <double> [#uses=1]
|
| 48 | +; Spill returned value: |
| 49 | +; CHECK: fstp |
39 | 50 | %tmp1314 = fptrunc double %tmp13 to float ; <float> [#uses=1]
|
40 | 51 | %tmp16 = tail call %"struct.std::basic_ostream<char,std::char_traits<char> >"* @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc( %"struct.std::basic_ostream<char,std::char_traits<char> >"* @_ZSt4cout, i8* getelementptr ([12 x i8]* @.str, i32 0, i32 0) ) ; <%"struct.std::basic_ostream<char,std::char_traits<char> >"*> [#uses=1]
|
41 | 52 | %tmp1920 = fpext float %tmp9 to double ; <double> [#uses=1]
|
| 53 | +; reload: |
| 54 | +; CHECK: fld |
| 55 | +; CHECK: fstpl |
| 56 | +; CHECK: ZNSolsEd |
42 | 57 | %tmp22 = tail call %"struct.std::basic_ostream<char,std::char_traits<char> >"* @_ZNSolsEd( %"struct.std::basic_ostream<char,std::char_traits<char> >"* %tmp16, double %tmp1920 ) ; <%"struct.std::basic_ostream<char,std::char_traits<char> >"*> [#uses=1]
|
43 | 58 | %tmp30 = tail call %"struct.std::basic_ostream<char,std::char_traits<char> >"* @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_( %"struct.std::basic_ostream<char,std::char_traits<char> >"* %tmp22 ) ; <%"struct.std::basic_ostream<char,std::char_traits<char> >"*> [#uses=0]
|
| 59 | +; reload: |
| 60 | +; CHECK: fld |
| 61 | +; CHECK: fstps |
| 62 | +; CHECK: ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc |
44 | 63 | %tmp34 = tail call %"struct.std::basic_ostream<char,std::char_traits<char> >"* @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc( %"struct.std::basic_ostream<char,std::char_traits<char> >"* @_ZSt4cout, i8* getelementptr ([13 x i8]* @.str1, i32 0, i32 0) ) ; <%"struct.std::basic_ostream<char,std::char_traits<char> >"*> [#uses=1]
|
45 | 64 | %tmp3940 = fpext float %tmp1314 to double ; <double> [#uses=1]
|
| 65 | +; CHECK: fstpl |
| 66 | +; CHECK: ZNSolsEd |
46 | 67 | %tmp42 = tail call %"struct.std::basic_ostream<char,std::char_traits<char> >"* @_ZNSolsEd( %"struct.std::basic_ostream<char,std::char_traits<char> >"* %tmp34, double %tmp3940 ) ; <%"struct.std::basic_ostream<char,std::char_traits<char> >"*> [#uses=1]
|
47 | 68 | %tmp51 = tail call %"struct.std::basic_ostream<char,std::char_traits<char> >"* @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_( %"struct.std::basic_ostream<char,std::char_traits<char> >"* %tmp42 ) ; <%"struct.std::basic_ostream<char,std::char_traits<char> >"*> [#uses=0]
|
48 | 69 | ret i32 0
|
|
0 commit comments