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 3--- | 4 5 define float @test_fdiv_float(float %arg1, float %arg2) { 6 %ret = fdiv float %arg1, %arg2 7 ret float %ret 8 } 9 10 define double @test_fdiv_double(double %arg1, double %arg2) { 11 %ret = fdiv double %arg1, %arg2 12 ret double %ret 13 } 14 15... 16--- 17name: test_fdiv_float 18alignment: 16 19legalized: false 20regBankSelected: false 21registers: 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: '' } 28liveins: 29fixedStack: 30stack: 31constants: 32body: | 33 bb.1 (%ir-block.0): 34 liveins: $xmm0, $xmm1 35 36 ; CHECK-LABEL: name: test_fdiv_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: [[FDIV:%[0-9]+]]:_(s32) = G_FDIV [[TRUNC]], [[TRUNC1]] 42 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s128) = G_ANYEXT [[FDIV]](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_FDIV %0, %1 50 %5:_(s128) = G_ANYEXT %4(s32) 51 $xmm0 = COPY %5(s128) 52 RET 0, implicit $xmm0 53 54... 55--- 56name: test_fdiv_double 57alignment: 16 58legalized: false 59regBankSelected: false 60registers: 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: '' } 67liveins: 68fixedStack: 69stack: 70constants: 71body: | 72 bb.1 (%ir-block.0): 73 liveins: $xmm0, $xmm1 74 75 ; CHECK-LABEL: name: test_fdiv_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: [[FDIV:%[0-9]+]]:_(s64) = G_FDIV [[TRUNC]], [[TRUNC1]] 81 ; CHECK: [[ANYEXT:%[0-9]+]]:_(s128) = G_ANYEXT [[FDIV]](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_FDIV %0, %1 89 %5:_(s128) = G_ANYEXT %4(s64) 90 $xmm0 = COPY %5(s128) 91 RET 0, implicit $xmm0 92 93... 94