| 1 |
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 |
| 2 |
; RUN: llc -verify-machineinstrs < %s -mcpu=pwr5 -mtriple=ppc32-- -mattr=+altivec | FileCheck %s |
| 3 |
|
| 4 |
define dso_local <4 x float> @intrinsic(<4 x float> noundef %a, <4 x float> noundef %b, <4 x float> noundef %c) local_unnamed_addr { |
| 5 |
; CHECK-LABEL: intrinsic: |
| 6 |
; CHECK: # %bb.0: # %entry |
| 7 |
; CHECK-NEXT: vnmsubfp 2, 2, 3, 4 |
| 8 |
; CHECK-NEXT: blr |
| 9 |
entry: |
| 10 |
%0 = tail call <4 x float> @llvm.ppc.altivec.vnmsubfp(<4 x float> %a, <4 x float> %b, <4 x float> %c) |
| 11 |
ret <4 x float> %0 |
| 12 |
} |
| 13 |
|
| 14 |
define <4 x float> @manual_llvm_fma(<4 x float> %a, <4 x float> %b, <4 x float> %c) unnamed_addr { |
| 15 |
; CHECK-LABEL: manual_llvm_fma: |
| 16 |
; CHECK: # %bb.0: # %start |
| 17 |
; CHECK-NEXT: vnmsubfp 2, 2, 3, 4 |
| 18 |
; CHECK-NEXT: blr |
| 19 |
start: |
| 20 |
%0 = fneg <4 x float> %c |
| 21 |
%1 = tail call <4 x float> @llvm.fma.v4f32(<4 x float> %a, <4 x float> %b, <4 x float> %0) |
| 22 |
%2 = fneg <4 x float> %1 |
| 23 |
ret <4 x float> %2 |
| 24 |
} |
| 25 |
|
| 26 |
define dso_local <4 x float> @manual_vmaddfp(<4 x float> noundef %a, <4 x float> noundef %b, <4 x float> noundef %c) local_unnamed_addr { |
| 27 |
; CHECK-LABEL: manual_vmaddfp: |
| 28 |
; CHECK: # %bb.0: # %entry |
| 29 |
; CHECK-NEXT: vnmsubfp 2, 2, 3, 4 |
| 30 |
; CHECK-NEXT: blr |
| 31 |
entry: |
| 32 |
%fneg.i3 = fneg <4 x float> %c |
| 33 |
%0 = tail call <4 x float> @llvm.ppc.altivec.vmaddfp(<4 x float> %a, <4 x float> %b, <4 x float> %fneg.i3) |
| 34 |
%fneg.i = fneg <4 x float> %0 |
| 35 |
ret <4 x float> %fneg.i |
| 36 |
} |