1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
|
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=aarch64-unknown-unknown -run-pass=legalizer -mattr=+fullfp16 -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=FP16
# RUN: llc -mtriple=aarch64-unknown-unknown -run-pass=legalizer -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=NO-FP16
...
---
name: s16_legal_with_full_fp16
alignment: 4
body: |
bb.0:
liveins: $h0, $h1
; FP16-LABEL: name: s16_legal_with_full_fp16
; FP16: %a:_(s16) = COPY $h0
; FP16: %b:_(s16) = COPY $h1
; FP16: %maxnum:_(s16) = G_FMAXNUM %a, %b
; FP16: $h0 = COPY %maxnum(s16)
; FP16: RET_ReallyLR implicit $h0
; NO-FP16-LABEL: name: s16_legal_with_full_fp16
; NO-FP16: %a:_(s16) = COPY $h0
; NO-FP16: %b:_(s16) = COPY $h1
; NO-FP16: [[FPEXT:%[0-9]+]]:_(s32) = G_FPEXT %a(s16)
; NO-FP16: [[FPEXT1:%[0-9]+]]:_(s32) = G_FPEXT %b(s16)
; NO-FP16: [[FMAXNUM:%[0-9]+]]:_(s32) = G_FMAXNUM [[FPEXT]], [[FPEXT1]]
; NO-FP16: %maxnum:_(s16) = G_FPTRUNC [[FMAXNUM]](s32)
; NO-FP16: $h0 = COPY %maxnum(s16)
; NO-FP16: RET_ReallyLR implicit $h0
%a:_(s16) = COPY $h0
%b:_(s16) = COPY $h1
%maxnum:_(s16) = G_FMAXNUM %a, %b
$h0 = COPY %maxnum(s16)
RET_ReallyLR implicit $h0
...
---
name: s32_legal
alignment: 4
body: |
bb.0:
liveins: $s0, $s1
; FP16-LABEL: name: s32_legal
; FP16: %a:_(s32) = COPY $s0
; FP16: %b:_(s32) = COPY $s1
; FP16: %maxnum:_(s32) = G_FMAXNUM %a, %b
; FP16: $s0 = COPY %maxnum(s32)
; FP16: RET_ReallyLR implicit $s0
; NO-FP16-LABEL: name: s32_legal
; NO-FP16: %a:_(s32) = COPY $s0
; NO-FP16: %b:_(s32) = COPY $s1
; NO-FP16: %maxnum:_(s32) = G_FMAXNUM %a, %b
; NO-FP16: $s0 = COPY %maxnum(s32)
; NO-FP16: RET_ReallyLR implicit $s0
%a:_(s32) = COPY $s0
%b:_(s32) = COPY $s1
%maxnum:_(s32) = G_FMAXNUM %a, %b
$s0 = COPY %maxnum(s32)
RET_ReallyLR implicit $s0
...
---
name: s64_legal
alignment: 4
body: |
bb.0:
liveins: $d0, $d1
; FP16-LABEL: name: s64_legal
; FP16: %a:_(s64) = COPY $d0
; FP16: %b:_(s64) = COPY $d1
; FP16: %maxnum:_(s64) = G_FMAXNUM %a, %b
; FP16: $d0 = COPY %maxnum(s64)
; FP16: RET_ReallyLR implicit $d0
; NO-FP16-LABEL: name: s64_legal
; NO-FP16: %a:_(s64) = COPY $d0
; NO-FP16: %b:_(s64) = COPY $d1
; NO-FP16: %maxnum:_(s64) = G_FMAXNUM %a, %b
; NO-FP16: $d0 = COPY %maxnum(s64)
; NO-FP16: RET_ReallyLR implicit $d0
%a:_(s64) = COPY $d0
%b:_(s64) = COPY $d1
%maxnum:_(s64) = G_FMAXNUM %a, %b
$d0 = COPY %maxnum(s64)
RET_ReallyLR implicit $d0
...
---
name: s128_libcall
alignment: 4
body: |
bb.0:
liveins: $q0, $q1
; FP16-LABEL: name: s128_libcall
; FP16: %a:_(s128) = COPY $q0
; FP16: %b:_(s128) = COPY $q1
; FP16: ADJCALLSTACKDOWN 0, 0, implicit-def $sp, implicit $sp
; FP16: $q0 = COPY %a(s128)
; FP16: $q1 = COPY %b(s128)
; FP16: BL &fmaxl, csr_aarch64_aapcs, implicit-def $lr, implicit $sp, implicit $q0, implicit $q1, implicit-def $q0
; FP16: ADJCALLSTACKUP 0, 0, implicit-def $sp, implicit $sp
; FP16: %maxnum:_(s128) = COPY $q0
; FP16: $q0 = COPY %maxnum(s128)
; FP16: RET_ReallyLR implicit $q0
; NO-FP16-LABEL: name: s128_libcall
; NO-FP16: %a:_(s128) = COPY $q0
; NO-FP16: %b:_(s128) = COPY $q1
; NO-FP16: ADJCALLSTACKDOWN 0, 0, implicit-def $sp, implicit $sp
; NO-FP16: $q0 = COPY %a(s128)
; NO-FP16: $q1 = COPY %b(s128)
; NO-FP16: BL &fmaxl, csr_aarch64_aapcs, implicit-def $lr, implicit $sp, implicit $q0, implicit $q1, implicit-def $q0
; NO-FP16: ADJCALLSTACKUP 0, 0, implicit-def $sp, implicit $sp
; NO-FP16: %maxnum:_(s128) = COPY $q0
; NO-FP16: $q0 = COPY %maxnum(s128)
; NO-FP16: RET_ReallyLR implicit $q0
%a:_(s128) = COPY $q0
%b:_(s128) = COPY $q1
%maxnum:_(s128) = G_FMAXNUM %a, %b
$q0 = COPY %maxnum(s128)
RET_ReallyLR implicit $q0
|