1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -run-pass=legalizer %s -o - | FileCheck %s
5 name: test_intrinsic_round_s32
10 ; CHECK-LABEL: name: test_intrinsic_round_s32
11 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
12 ; CHECK: $vgpr0 = COPY [[COPY]](s32)
13 %0:_(s32) = COPY $vgpr0
14 %1:_(s32) = G_INTRINSIC_ROUND %0
19 name: test_intrinsic_round_s64
24 ; CHECK-LABEL: name: test_intrinsic_round_s64
25 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
26 ; CHECK: [[INTRINSIC_ROUND:%[0-9]+]]:_(s64) = G_INTRINSIC_ROUND [[COPY]]
27 ; CHECK: $vgpr0_vgpr1 = COPY [[INTRINSIC_ROUND]](s64)
28 %0:_(s64) = COPY $vgpr0_vgpr1
29 %1:_(s64) = G_INTRINSIC_ROUND %0
30 $vgpr0_vgpr1 = COPY %1
34 name: test_intrinsic_round_v2s32
39 ; CHECK-LABEL: name: test_intrinsic_round_v2s32
40 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr0_vgpr1
41 ; CHECK: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<2 x s32>)
42 ; CHECK: [[INTRINSIC_ROUND:%[0-9]+]]:_(s32) = G_INTRINSIC_ROUND [[UV]]
43 ; CHECK: [[INTRINSIC_ROUND1:%[0-9]+]]:_(s32) = G_INTRINSIC_ROUND [[UV1]]
44 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s32>) = G_BUILD_VECTOR [[INTRINSIC_ROUND]](s32), [[INTRINSIC_ROUND1]](s32)
45 ; CHECK: $vgpr0_vgpr1 = COPY [[BUILD_VECTOR]](<2 x s32>)
46 %0:_(<2 x s32>) = COPY $vgpr0_vgpr1
47 %1:_(<2 x s32>) = G_INTRINSIC_ROUND %0
48 $vgpr0_vgpr1 = COPY %1
52 name: test_intrinsic_round_v2s64
55 liveins: $vgpr0_vgpr1_vgpr2_vgpr3
57 ; CHECK-LABEL: name: test_intrinsic_round_v2s64
58 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
59 ; CHECK: [[UV:%[0-9]+]]:_(s64), [[UV1:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY]](<2 x s64>)
60 ; CHECK: [[INTRINSIC_ROUND:%[0-9]+]]:_(s64) = G_INTRINSIC_ROUND [[UV]]
61 ; CHECK: [[INTRINSIC_ROUND1:%[0-9]+]]:_(s64) = G_INTRINSIC_ROUND [[UV1]]
62 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[INTRINSIC_ROUND]](s64), [[INTRINSIC_ROUND1]](s64)
63 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[BUILD_VECTOR]](<2 x s64>)
64 %0:_(<2 x s64>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
65 %1:_(<2 x s64>) = G_INTRINSIC_ROUND %0
66 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %1