Owen Anderson | 3ccd818 | 2010-07-19 08:14:26 +0000 | [diff] [blame^] | 1 | ; RUN: opt -S -instcombine %s | FileCheck %s |
| 2 | |
| 3 | define float @foo(float %x) nounwind readnone ssp { |
| 4 | entry: |
| 5 | ; CHECK-NOT: fpext |
| 6 | ; CHECK-NOT: sqrt( |
| 7 | ; CHECK: sqrtf( |
| 8 | ; CHECK-NOT: fptrunc |
| 9 | %conv = fpext float %x to double ; <double> [#uses=1] |
| 10 | %call = tail call double @sqrt(double %conv) nounwind ; <double> [#uses=1] |
| 11 | %conv1 = fptrunc double %call to float ; <float> [#uses=1] |
| 12 | ; CHECK: ret float |
| 13 | ret float %conv1 |
| 14 | } |
| 15 | |
| 16 | declare double @sqrt(double) readnone |