Andrew Kaylor | 647025f | 2017-06-09 23:18:11 +0000 | [diff] [blame] | 1 | ; RUN: opt < %s -instcombine -S | FileCheck %s |
| 2 | |
| 3 | declare double @acos(double) |
| 4 | |
| 5 | ; Check that functions without any function attributes are simplified. |
| 6 | |
| 7 | define double @test_simplify_acos() { |
| 8 | ; CHECK-LABEL: @test_simplify_acos |
| 9 | %pi = call double @acos(double -1.000000e+00) |
| 10 | ; CHECK-NOT: call double @acos |
| 11 | ; CHECK: ret double 0x400921FB54442D18 |
| 12 | ret double %pi |
| 13 | } |
| 14 | |
| 15 | define double @test_acos_nobuiltin() { |
| 16 | ; CHECK-LABEL: @test_acos_nobuiltin |
| 17 | %pi = call double @acos(double -1.000000e+00) nobuiltin |
| 18 | ; CHECK: call double @acos(double -1.000000e+00) |
| 19 | ret double %pi |
| 20 | } |