• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2; RUN: llc -o - -verify-machineinstrs -global-isel -stop-after=irtranslator -fp-contract=fast %s | FileCheck %s --check-prefix=FPFAST
3; RUN: llc -o - -verify-machineinstrs -global-isel -stop-after=irtranslator -fp-contract=off %s | FileCheck %s --check-prefix=FPOFF
4target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
5target triple = "aarch64--"
6
7define float @test_fmuladd(float %x, float %y, float %z) {
8  ; FPFAST-LABEL: name: test_fmuladd
9  ; FPFAST: bb.1 (%ir-block.0):
10  ; FPFAST:   liveins: $s0, $s1, $s2
11  ; FPFAST:   [[COPY:%[0-9]+]]:_(s32) = COPY $s0
12  ; FPFAST:   [[COPY1:%[0-9]+]]:_(s32) = COPY $s1
13  ; FPFAST:   [[COPY2:%[0-9]+]]:_(s32) = COPY $s2
14  ; FPFAST:   [[FMA:%[0-9]+]]:_(s32) = G_FMA [[COPY]], [[COPY1]], [[COPY2]]
15  ; FPFAST:   $s0 = COPY [[FMA]](s32)
16  ; FPFAST:   RET_ReallyLR implicit $s0
17  ; FPOFF-LABEL: name: test_fmuladd
18  ; FPOFF: bb.1 (%ir-block.0):
19  ; FPOFF:   liveins: $s0, $s1, $s2
20  ; FPOFF:   [[COPY:%[0-9]+]]:_(s32) = COPY $s0
21  ; FPOFF:   [[COPY1:%[0-9]+]]:_(s32) = COPY $s1
22  ; FPOFF:   [[COPY2:%[0-9]+]]:_(s32) = COPY $s2
23  ; FPOFF:   [[FMUL:%[0-9]+]]:_(s32) = G_FMUL [[COPY]], [[COPY1]]
24  ; FPOFF:   [[FADD:%[0-9]+]]:_(s32) = G_FADD [[FMUL]], [[COPY2]]
25  ; FPOFF:   $s0 = COPY [[FADD]](s32)
26  ; FPOFF:   RET_ReallyLR implicit $s0
27  %res = call float @llvm.fmuladd.f32(float %x, float %y, float %z)
28  ret float %res
29}
30
31; Function Attrs: nounwind readnone speculatable
32declare float @llvm.fmuladd.f32(float, float, float) #0
33
34attributes #0 = { nounwind readnone speculatable }
35