forked from OSchip/llvm-project
76 lines
1.9 KiB
YAML
76 lines
1.9 KiB
YAML
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
|
|
# RUN: llc -mtriple=x86_64-linux-gnu -global-isel -run-pass=legalizer %s -o - | FileCheck %s
|
|
--- |
|
|
|
|
define float @test_fadd_float(float %arg1, float %arg2) {
|
|
%ret = fadd float %arg1, %arg2
|
|
ret float %ret
|
|
}
|
|
|
|
define double @test_fadd_double(double %arg1, double %arg2) {
|
|
%ret = fadd double %arg1, %arg2
|
|
ret double %ret
|
|
}
|
|
|
|
...
|
|
---
|
|
name: test_fadd_float
|
|
alignment: 4
|
|
legalized: false
|
|
regBankSelected: false
|
|
registers:
|
|
- { id: 0, class: _, preferred-register: '' }
|
|
- { id: 1, class: _, preferred-register: '' }
|
|
- { id: 2, class: _, preferred-register: '' }
|
|
liveins:
|
|
fixedStack:
|
|
stack:
|
|
constants:
|
|
body: |
|
|
bb.1 (%ir-block.0):
|
|
liveins: %xmm0, %xmm1
|
|
|
|
; CHECK-LABEL: name: test_fadd_float
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY %xmm0
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY %xmm1
|
|
; CHECK: [[FADD:%[0-9]+]]:_(s32) = G_FADD [[COPY]], [[COPY1]]
|
|
; CHECK: %xmm0 = COPY [[FADD]](s32)
|
|
; CHECK: RET 0, implicit %xmm0
|
|
%0(s32) = COPY %xmm0
|
|
%1(s32) = COPY %xmm1
|
|
%2(s32) = G_FADD %0, %1
|
|
%xmm0 = COPY %2(s32)
|
|
RET 0, implicit %xmm0
|
|
|
|
...
|
|
---
|
|
name: test_fadd_double
|
|
alignment: 4
|
|
legalized: false
|
|
regBankSelected: false
|
|
registers:
|
|
- { id: 0, class: _, preferred-register: '' }
|
|
- { id: 1, class: _, preferred-register: '' }
|
|
- { id: 2, class: _, preferred-register: '' }
|
|
liveins:
|
|
fixedStack:
|
|
stack:
|
|
constants:
|
|
body: |
|
|
bb.1 (%ir-block.0):
|
|
liveins: %xmm0, %xmm1
|
|
|
|
; CHECK-LABEL: name: test_fadd_double
|
|
; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY %xmm0
|
|
; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY %xmm1
|
|
; CHECK: [[FADD:%[0-9]+]]:_(s64) = G_FADD [[COPY]], [[COPY1]]
|
|
; CHECK: %xmm0 = COPY [[FADD]](s64)
|
|
; CHECK: RET 0, implicit %xmm0
|
|
%0(s64) = COPY %xmm0
|
|
%1(s64) = COPY %xmm1
|
|
%2(s64) = G_FADD %0, %1
|
|
%xmm0 = COPY %2(s64)
|
|
RET 0, implicit %xmm0
|
|
|
|
...
|