| Stephen Lin | 4ee5e87 | 2013-07-09 19:27:10 +0000 | [diff] [blame] | 1 | ; RUN: llc -march=x86 -mcpu=bdver2 -mattr=-fma -mtriple=x86_64-apple-darwin < %s | FileCheck %s | 
|  | 2 | ; RUN: llc -march=x86 -mcpu=bdver2 -mattr=-fma,-fma4 -mtriple=x86_64-apple-darwin < %s | FileCheck %s --check-prefix=CHECK-NOFMA | 
| Stephen Lin | 73de7bf | 2013-07-09 18:16:56 +0000 | [diff] [blame] | 3 |  | 
| Stephen Lin | 764d8d3 | 2013-07-12 14:54:12 +0000 | [diff] [blame] | 4 | ; CHECK-LABEL: fmafunc | 
| Stephen Lin | 73de7bf | 2013-07-09 18:16:56 +0000 | [diff] [blame] | 5 | define <3 x float> @fmafunc(<3 x float> %a, <3 x float> %b, <3 x float> %c) { | 
|  | 6 |  | 
|  | 7 | ; CHECK-NOT: vmulps | 
|  | 8 | ; CHECK-NOT: vaddps | 
|  | 9 | ; CHECK: vfmaddps | 
|  | 10 | ; CHECK-NOT: vmulps | 
|  | 11 | ; CHECK-NOT: vaddps | 
|  | 12 |  | 
|  | 13 | ; CHECK-NOFMA-NOT: calll | 
|  | 14 | ; CHECK-NOFMA: vmulps | 
|  | 15 | ; CHECK-NOFMA: vaddps | 
|  | 16 | ; CHECK-NOFMA-NOT: calll | 
|  | 17 |  | 
|  | 18 | %ret = tail call <3 x float> @llvm.fmuladd.v3f32(<3 x float> %a, <3 x float> %b, <3 x float> %c) | 
|  | 19 | ret <3 x float> %ret | 
|  | 20 | } | 
|  | 21 |  | 
|  | 22 | declare <3 x float> @llvm.fmuladd.v3f32(<3 x float>, <3 x float>, <3 x float>) nounwind readnone |