[TTI] getTypeBasedIntrinsicInstrCost - add basic handling for strided load/store...
[llvm-project.git] / llvm / test / CodeGen / AArch64 / GlobalISel / combine-constant-fold-fma.mir
blob73e03282f6c7f5312e0aae940219cce723f0cc65
1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple aarch64 -run-pass=aarch64-prelegalizer-combiner -verify-machineinstrs %s -o - | FileCheck %s
4 ---
5 name:            fma
6 liveins:
7   - { reg: '$d0' }
8 body:             |
9   bb.1.entry:
10     liveins: $d0
12     ; CHECK-LABEL: name: fma
13     ; CHECK: liveins: $d0
14     ; CHECK-NEXT: {{  $}}
15     ; CHECK-NEXT: %res:_(s64) = G_FCONSTANT double 8.100000e+01
16     ; CHECK-NEXT: $d0 = COPY %res(s64)
17     ; CHECK-NEXT: RET_ReallyLR implicit $d0
18     %a:_(s64) = G_FCONSTANT double 40.0
19     %b:_(s64) = G_FCONSTANT double 2.0
20     %c:_(s64) = G_FCONSTANT double 1.0
21     %res:_(s64) = G_FMA %a, %b, %c
22     $d0 = COPY %res(s64)
23     RET_ReallyLR implicit $d0
25 ...
27 ---
28 name:            fmad
29 liveins:
30   - { reg: '$d0' }
31 body:             |
32   bb.1.entry:
33     liveins: $d0
35     ; CHECK-LABEL: name: fmad
36     ; CHECK: liveins: $d0
37     ; CHECK-NEXT: {{  $}}
38     ; CHECK-NEXT: %res:_(s64) = G_FCONSTANT double 8.100000e+01
39     ; CHECK-NEXT: $d0 = COPY %res(s64)
40     ; CHECK-NEXT: RET_ReallyLR implicit $d0
41     %a:_(s64) = G_FCONSTANT double 40.0
42     %b:_(s64) = G_FCONSTANT double 2.0
43     %c:_(s64) = G_FCONSTANT double 1.0
44     %res:_(s64) = G_FMAD %a, %b, %c
45     $d0 = COPY %res(s64)
46     RET_ReallyLR implicit $d0
48 ...