1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 4
2 # RUN: llc -mtriple=riscv64 -mattr=+f,+v -run-pass=legalizer %s -o - | FileCheck %s
7 ; CHECK-LABEL: name: freeze_i32
8 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
9 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s64)
10 ; CHECK-NEXT: [[FREEZE:%[0-9]+]]:_(s32) = G_FREEZE [[TRUNC]]
11 ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT [[FREEZE]](s32)
12 ; CHECK-NEXT: $x10 = COPY [[ANYEXT]](s64)
13 ; CHECK-NEXT: PseudoRET implicit $x10
15 %2:_(s32) = G_TRUNC %1(s64)
16 %3:_(s32) = G_FREEZE %2
17 %4:_(s64) = G_ANYEXT %3(s32)
19 PseudoRET implicit $x10
26 ; CHECK-LABEL: name: freeze_f32
27 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $f10_f
28 ; CHECK-NEXT: [[FREEZE:%[0-9]+]]:_(s32) = G_FREEZE [[COPY]]
29 ; CHECK-NEXT: $f10_f = COPY [[FREEZE]](s32)
30 ; CHECK-NEXT: PseudoRET implicit $f10_f
31 %1:_(s32) = COPY $f10_f
32 %2:_(s32) = G_FREEZE %1
34 PseudoRET implicit $f10_f
41 ; CHECK-LABEL: name: freeze_i64
42 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10
43 ; CHECK-NEXT: [[FREEZE:%[0-9]+]]:_(s64) = G_FREEZE [[COPY]]
44 ; CHECK-NEXT: $x10 = COPY [[FREEZE]](s64)
45 ; CHECK-NEXT: PseudoRET implicit $x10
47 %2:_(s64) = G_FREEZE %1
49 PseudoRET implicit $x10
56 ; CHECK-LABEL: name: freeze_nxv2i1
57 ; CHECK: [[COPY:%[0-9]+]]:_(<vscale x 2 x s1>) = COPY $v8
58 ; CHECK-NEXT: [[FREEZE:%[0-9]+]]:_(<vscale x 2 x s1>) = G_FREEZE [[COPY]]
59 ; CHECK-NEXT: $v8 = COPY [[FREEZE]](<vscale x 2 x s1>)
60 ; CHECK-NEXT: PseudoRET implicit $v8
61 %1:_(<vscale x 2 x s1>) = COPY $v8
62 %2:_(<vscale x 2 x s1>) = G_FREEZE %1
63 $v8 = COPY %2(<vscale x 2 x s1>)
64 PseudoRET implicit $v8
71 ; CHECK-LABEL: name: freeze_nxv2i32
72 ; CHECK: [[COPY:%[0-9]+]]:_(<vscale x 2 x s32>) = COPY $v8
73 ; CHECK-NEXT: [[FREEZE:%[0-9]+]]:_(<vscale x 2 x s32>) = G_FREEZE [[COPY]]
74 ; CHECK-NEXT: $v8 = COPY [[FREEZE]](<vscale x 2 x s32>)
75 ; CHECK-NEXT: PseudoRET implicit $v8
76 %1:_(<vscale x 2 x s32>) = COPY $v8
77 %2:_(<vscale x 2 x s32>) = G_FREEZE %1
78 $v8 = COPY %2(<vscale x 2 x s32>)
79 PseudoRET implicit $v8
86 ; CHECK-LABEL: name: freeze_nxv2i64
87 ; CHECK: [[COPY:%[0-9]+]]:_(<vscale x 2 x s64>) = COPY $v8
88 ; CHECK-NEXT: [[FREEZE:%[0-9]+]]:_(<vscale x 2 x s64>) = G_FREEZE [[COPY]]
89 ; CHECK-NEXT: $v8m2 = COPY [[FREEZE]](<vscale x 2 x s64>)
90 ; CHECK-NEXT: PseudoRET implicit $v8m2
91 %1:_(<vscale x 2 x s64>) = COPY $v8
92 %2:_(<vscale x 2 x s64>) = G_FREEZE %1
93 $v8m2 = COPY %2(<vscale x 2 x s64>)
94 PseudoRET implicit $v8m2