# 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-NEXT: %b:_(s16) = COPY $h1 ; FP16-NEXT: %legalize_me:_(s16) = G_FMAXIMUM %a, %b ; FP16-NEXT: $h0 = COPY %legalize_me(s16) ; FP16-NEXT: RET_ReallyLR implicit $h0 ; NO-FP16-LABEL: name: s16_legal_with_full_fp16 ; NO-FP16: %a:_(s16) = COPY $h0 ; NO-FP16-NEXT: %b:_(s16) = COPY $h1 ; NO-FP16-NEXT: [[FPEXT:%[0-9]+]]:_(s32) = G_FPEXT %a(s16) ; NO-FP16-NEXT: [[FPEXT1:%[0-9]+]]:_(s32) = G_FPEXT %b(s16) ; NO-FP16-NEXT: [[FMAXIMUM:%[0-9]+]]:_(s32) = G_FMAXIMUM [[FPEXT]], [[FPEXT1]] ; NO-FP16-NEXT: %legalize_me:_(s16) = G_FPTRUNC [[FMAXIMUM]](s32) ; NO-FP16-NEXT: $h0 = COPY %legalize_me(s16) ; NO-FP16-NEXT: RET_ReallyLR implicit $h0 %a:_(s16) = COPY $h0 %b:_(s16) = COPY $h1 %legalize_me:_(s16) = G_FMAXIMUM %a, %b $h0 = COPY %legalize_me(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-NEXT: %b:_(s32) = COPY $s1 ; FP16-NEXT: %legalize_me:_(s32) = G_FMAXIMUM %a, %b ; FP16-NEXT: $s0 = COPY %legalize_me(s32) ; FP16-NEXT: RET_ReallyLR implicit $s0 ; NO-FP16-LABEL: name: s32_legal ; NO-FP16: %a:_(s32) = COPY $s0 ; NO-FP16-NEXT: %b:_(s32) = COPY $s1 ; NO-FP16-NEXT: %legalize_me:_(s32) = G_FMAXIMUM %a, %b ; NO-FP16-NEXT: $s0 = COPY %legalize_me(s32) ; NO-FP16-NEXT: RET_ReallyLR implicit $s0 %a:_(s32) = COPY $s0 %b:_(s32) = COPY $s1 %legalize_me:_(s32) = G_FMAXIMUM %a, %b $s0 = COPY %legalize_me(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-NEXT: %b:_(s64) = COPY $d1 ; FP16-NEXT: %legalize_me:_(s64) = G_FMAXIMUM %a, %b ; FP16-NEXT: $d0 = COPY %legalize_me(s64) ; FP16-NEXT: RET_ReallyLR implicit $d0 ; NO-FP16-LABEL: name: s64_legal ; NO-FP16: %a:_(s64) = COPY $d0 ; NO-FP16-NEXT: %b:_(s64) = COPY $d1 ; NO-FP16-NEXT: %legalize_me:_(s64) = G_FMAXIMUM %a, %b ; NO-FP16-NEXT: $d0 = COPY %legalize_me(s64) ; NO-FP16-NEXT: RET_ReallyLR implicit $d0 %a:_(s64) = COPY $d0 %b:_(s64) = COPY $d1 %legalize_me:_(s64) = G_FMAXIMUM %a, %b $d0 = COPY %legalize_me(s64) RET_ReallyLR implicit $d0