Nadav Rotem | ec7b5e9 | 2013-08-21 05:03:10 +0000 | [diff] [blame] | 1 | ; RUN: %lli %s | FileCheck %s |
| 2 | ; REQUIRES: fma3 |
| 3 | ; CHECK: 12.000000 |
| 4 | |
| 5 | @msg_double = internal global [4 x i8] c"%f\0A\00" |
| 6 | |
| 7 | declare i32 @printf(i8*, ...) |
| 8 | |
| 9 | define i32 @main() { |
| 10 | %fma = tail call double @llvm.fma.f64(double 3.0, double 3.0, double 3.0) nounwind readnone |
| 11 | |
David Blaikie | 198d8ba | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 12 | %ptr1 = getelementptr [4 x i8], [4 x i8]* @msg_double, i32 0, i32 0 |
David Blaikie | 32b845d | 2015-04-16 23:24:18 +0000 | [diff] [blame] | 13 | call i32 (i8*,...) @printf(i8* %ptr1, double %fma) |
Nadav Rotem | ec7b5e9 | 2013-08-21 05:03:10 +0000 | [diff] [blame] | 14 | |
| 15 | ret i32 0 |
| 16 | } |
| 17 | |
| 18 | declare double @llvm.fma.f64(double, double, double) nounwind readnone |