1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=aarch64 -run-pass=regbankselect -verify-machineinstrs %s -o - | FileCheck %s
10 ; CHECK-LABEL: name: direct
11 ; CHECK: %a:fpr(s32) = COPY $s0
12 ; CHECK-NEXT: %b:fpr(s32) = COPY $s1
13 ; CHECK-NEXT: %needs_fpr:fpr(s32) = G_FMAXIMUM %a, %b
14 ; CHECK-NEXT: $s0 = COPY %needs_fpr(s32)
15 ; CHECK-NEXT: RET_ReallyLR implicit $s0
18 %needs_fpr:_(s32) = G_FMAXIMUM %a, %b
19 $s0 = COPY %needs_fpr(s32)
20 RET_ReallyLR implicit $s0
29 ; CHECK-LABEL: name: fed_by_load
30 ; CHECK: %ptr_a:gpr(p0) = COPY $x0
31 ; CHECK-NEXT: %ptr_b:gpr(p0) = COPY $x1
32 ; CHECK-NEXT: %a:fpr(s32) = G_LOAD %ptr_a(p0) :: (load (s32))
33 ; CHECK-NEXT: %b:fpr(s32) = G_LOAD %ptr_a(p0) :: (load (s32))
34 ; CHECK-NEXT: %needs_fpr:fpr(s32) = G_FMAXIMUM %a, %b
35 ; CHECK-NEXT: $s0 = COPY %needs_fpr(s32)
36 ; CHECK-NEXT: RET_ReallyLR implicit $s0
37 %ptr_a:_(p0) = COPY $x0
38 %ptr_b:_(p0) = COPY $x1
39 %a:_(s32) = G_LOAD %ptr_a(p0) :: (load (s32))
40 %b:_(s32) = G_LOAD %ptr_a(p0) :: (load (s32))
41 %needs_fpr:_(s32) = G_FMAXIMUM %a, %b
42 $s0 = COPY %needs_fpr(s32)
43 RET_ReallyLR implicit $s0
52 ; CHECK-LABEL: name: create_copy
53 ; CHECK: %a:gpr(s32) = COPY $w0
54 ; CHECK-NEXT: %b:gpr(s32) = COPY $w1
55 ; CHECK-NEXT: [[COPY:%[0-9]+]]:fpr(s32) = COPY %a(s32)
56 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:fpr(s32) = COPY %b(s32)
57 ; CHECK-NEXT: %needs_fpr:fpr(s32) = G_FMAXIMUM [[COPY]], [[COPY1]]
58 ; CHECK-NEXT: $s0 = COPY %needs_fpr(s32)
59 ; CHECK-NEXT: RET_ReallyLR implicit $s0
62 %needs_fpr:_(s32) = G_FMAXIMUM %a, %b
63 $s0 = COPY %needs_fpr(s32)
64 RET_ReallyLR implicit $s0