1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn -run-pass=amdgpu-prelegalizer-combiner -verify-machineinstrs %s -o - | FileCheck %s
6 tracksRegLiveness: true
11 ; CHECK-LABEL: name: test_f16
12 ; CHECK: liveins: $vgpr0
14 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
15 ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY]](s32)
16 ; CHECK-NEXT: [[FABS:%[0-9]+]]:_(s16) = G_FABS [[TRUNC]]
17 ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[FABS]](s16)
18 ; CHECK-NEXT: $vgpr0 = COPY [[ANYEXT]](s32)
19 %0:_(s32) = COPY $vgpr0
20 %1:_(s16) = G_TRUNC %0:_(s32)
21 %2:_(s16) = G_FNEG %1:_
22 %3:_(s16) = G_FABS %2:_
23 %4:_(s32) = G_ANYEXT %3:_(s16)
24 $vgpr0 = COPY %4:_(s32)
29 tracksRegLiveness: true
34 ; CHECK-LABEL: name: test_f32
35 ; CHECK: liveins: $vgpr0
37 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
38 ; CHECK-NEXT: [[FABS:%[0-9]+]]:_(s32) = G_FABS [[COPY]]
39 ; CHECK-NEXT: $vgpr0 = COPY [[FABS]](s32)
40 %0:_(s32) = COPY $vgpr0
48 tracksRegLiveness: true
53 ; CHECK-LABEL: name: test_f64
54 ; CHECK: liveins: $vgpr0_vgpr1
56 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
57 ; CHECK-NEXT: [[FABS:%[0-9]+]]:_(s64) = G_FABS [[COPY]]
58 ; CHECK-NEXT: $vgpr0_vgpr1 = COPY [[FABS]](s64)
59 %0:_(s64) = COPY $vgpr0_vgpr1
62 $vgpr0_vgpr1 = COPY %2(s64)
67 tracksRegLiveness: true
72 ; CHECK-LABEL: name: test_v2f16
73 ; CHECK: liveins: $vgpr0
75 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0
76 ; CHECK-NEXT: [[FABS:%[0-9]+]]:_(<2 x s16>) = G_FABS [[COPY]]
77 ; CHECK-NEXT: $vgpr0 = COPY [[FABS]](<2 x s16>)
78 %0:_(<2 x s16>) = COPY $vgpr0
79 %1:_(<2 x s16>) = G_FNEG %0
80 %2:_(<2 x s16>) = G_FABS %1
81 $vgpr0 = COPY %2(<2 x s16>)
86 tracksRegLiveness: true
89 liveins: $vgpr0_vgpr1_vgpr2
91 ; CHECK-LABEL: name: test_v3f32
92 ; CHECK: liveins: $vgpr0_vgpr1_vgpr2
94 ; CHECK-NEXT: [[COPY:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
95 ; CHECK-NEXT: [[FABS:%[0-9]+]]:_(<3 x s32>) = G_FABS [[COPY]]
96 ; CHECK-NEXT: $vgpr0_vgpr1_vgpr2 = COPY [[FABS]](<3 x s32>)
97 %0:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
98 %1:_(<3 x s32>) = G_FNEG %0
99 %2:_(<3 x s32>) = G_FABS %1
100 $vgpr0_vgpr1_vgpr2 = COPY %2(<3 x s32>)