1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=x86_64-linux-gnu -run-pass=legalizer %s -o - | FileCheck %s
5 define float @test_fadd_float(float %arg1, float %arg2) {
6 %ret = fadd float %arg1, %arg2
10 define double @test_fadd_double(double %arg1, double %arg2) {
11 %ret = fadd double %arg1, %arg2
20 regBankSelected: false
22 - { id: 0, class: _, preferred-register: '' }
23 - { id: 1, class: _, preferred-register: '' }
24 - { id: 2, class: _, preferred-register: '' }
25 - { id: 3, class: _, preferred-register: '' }
26 - { id: 4, class: _, preferred-register: '' }
27 - { id: 5, class: _, preferred-register: '' }
36 ; CHECK-LABEL: name: test_fadd_float
37 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
38 ; CHECK: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s128)
39 ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
40 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s128)
41 ; CHECK: [[FADD:%[0-9]+]]:_(s32) = G_FADD [[TRUNC]], [[TRUNC1]]
42 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s128) = G_ANYEXT [[FADD]](s32)
43 ; CHECK: $xmm0 = COPY [[ANYEXT]](s128)
44 ; CHECK: RET 0, implicit $xmm0
45 %2:_(s128) = COPY $xmm0
46 %0:_(s32) = G_TRUNC %2(s128)
47 %3:_(s128) = COPY $xmm1
48 %1:_(s32) = G_TRUNC %3(s128)
49 %4:_(s32) = G_FADD %0, %1
50 %5:_(s128) = G_ANYEXT %4(s32)
56 name: test_fadd_double
59 regBankSelected: false
61 - { id: 0, class: _, preferred-register: '' }
62 - { id: 1, class: _, preferred-register: '' }
63 - { id: 2, class: _, preferred-register: '' }
64 - { id: 3, class: _, preferred-register: '' }
65 - { id: 4, class: _, preferred-register: '' }
66 - { id: 5, class: _, preferred-register: '' }
75 ; CHECK-LABEL: name: test_fadd_double
76 ; CHECK: [[COPY:%[0-9]+]]:_(s128) = COPY $xmm0
77 ; CHECK: [[TRUNC:%[0-9]+]]:_(s64) = G_TRUNC [[COPY]](s128)
78 ; CHECK: [[COPY1:%[0-9]+]]:_(s128) = COPY $xmm1
79 ; CHECK: [[TRUNC1:%[0-9]+]]:_(s64) = G_TRUNC [[COPY1]](s128)
80 ; CHECK: [[FADD:%[0-9]+]]:_(s64) = G_FADD [[TRUNC]], [[TRUNC1]]
81 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s128) = G_ANYEXT [[FADD]](s64)
82 ; CHECK: $xmm0 = COPY [[ANYEXT]](s128)
83 ; CHECK: RET 0, implicit $xmm0
84 %2:_(s128) = COPY $xmm0
85 %0:_(s64) = G_TRUNC %2(s128)
86 %3:_(s128) = COPY $xmm1
87 %1:_(s64) = G_TRUNC %3(s128)
88 %4:_(s64) = G_FADD %0, %1
89 %5:_(s128) = G_ANYEXT %4(s64)