1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00
llvm-mirror/test/CodeGen/X86/extended-fma-contraction.ll
Simon Pilgrim 62c0dbfd59 [X86] X86InstComments - add FMA4 comments
These typically match the FMA3 equivalents, although the multiply operands sometimes get flipped due to the FMA3 permute variants.
2020-02-08 17:02:00 +00:00

21 lines
903 B
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -mcpu=bdver2 -mattr=-fma -mtriple=i686-apple-darwin < %s | FileCheck %s
; RUN: llc -mcpu=bdver2 -mattr=-fma,-fma4 -mtriple=i686-apple-darwin < %s | FileCheck %s --check-prefix=CHECK-NOFMA
define <3 x float> @fmafunc(<3 x float> %a, <3 x float> %b, <3 x float> %c) {
; CHECK-LABEL: fmafunc:
; CHECK: ## %bb.0:
; CHECK-NEXT: vfmaddps {{.*#+}} xmm0 = (xmm0 * xmm1) + xmm2
; CHECK-NEXT: retl
;
; CHECK-NOFMA-LABEL: fmafunc:
; CHECK-NOFMA: ## %bb.0:
; CHECK-NOFMA-NEXT: vmulps %xmm1, %xmm0, %xmm0
; CHECK-NOFMA-NEXT: vaddps %xmm2, %xmm0, %xmm0
; CHECK-NOFMA-NEXT: retl
%ret = tail call <3 x float> @llvm.fmuladd.v3f32(<3 x float> %a, <3 x float> %b, <3 x float> %c)
ret <3 x float> %ret
}
declare <3 x float> @llvm.fmuladd.v3f32(<3 x float>, <3 x float>, <3 x float>) nounwind readnone