1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py 2# RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=tahiti -run-pass=legalizer %s -o - | FileCheck %s 3# RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -run-pass=legalizer %s -o - | FileCheck %s 4# RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx1010 -run-pass=legalizer %s -o - | FileCheck %s 5 6--- 7name: test_fmad_s64_flush 8machineFunctionInfo: 9 mode: 10 fp64-fp16-output-denormals: false 11 fp64-fp16-input-denormals: false 12 13body: | 14 bb.0: 15 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3, $vgpr4_vgpr5 16 17 ; CHECK-LABEL: name: test_fmad_s64_flush 18 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1 19 ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3 20 ; CHECK: [[COPY2:%[0-9]+]]:_(s64) = COPY $vgpr4_vgpr5 21 ; CHECK: [[FMUL:%[0-9]+]]:_(s64) = G_FMUL [[COPY]], [[COPY1]] 22 ; CHECK: [[FADD:%[0-9]+]]:_(s64) = G_FADD [[FMUL]], [[COPY2]] 23 ; CHECK: $vgpr0_vgpr1 = COPY [[FADD]](s64) 24 %0:_(s64) = COPY $vgpr0_vgpr1 25 %1:_(s64) = COPY $vgpr2_vgpr3 26 %2:_(s64) = COPY $vgpr4_vgpr5 27 %3:_(s64) = G_FMAD %0, %1, %2 28 $vgpr0_vgpr1 = COPY %3 29... 30 31--- 32name: test_fmad_v2s64_flush 33machineFunctionInfo: 34 mode: 35 fp64-fp16-input-denormals: false 36 fp64-fp16-output-denormals: false 37 38body: | 39 bb.0: 40 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6_vgpr7, $vgpr8_vgpr9_vgpr10_vgpr11 41 42 ; CHECK-LABEL: name: test_fmad_v2s64_flush 43 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3 44 ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr4_vgpr5_vgpr6_vgpr7 45 ; CHECK: [[COPY2:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr8_vgpr9_vgpr10_vgpr11 46 ; CHECK: [[UV:%[0-9]+]]:_(s64), [[UV1:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY]](<2 x s64>) 47 ; CHECK: [[UV2:%[0-9]+]]:_(s64), [[UV3:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY1]](<2 x s64>) 48 ; CHECK: [[UV4:%[0-9]+]]:_(s64), [[UV5:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY2]](<2 x s64>) 49 ; CHECK: [[FMUL:%[0-9]+]]:_(s64) = G_FMUL [[UV]], [[UV2]] 50 ; CHECK: [[FADD:%[0-9]+]]:_(s64) = G_FADD [[FMUL]], [[UV4]] 51 ; CHECK: [[FMUL1:%[0-9]+]]:_(s64) = G_FMUL [[UV1]], [[UV3]] 52 ; CHECK: [[FADD1:%[0-9]+]]:_(s64) = G_FADD [[FMUL1]], [[UV5]] 53 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[FADD]](s64), [[FADD1]](s64) 54 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[BUILD_VECTOR]](<2 x s64>) 55 %0:_(<2 x s64>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3 56 %1:_(<2 x s64>) = COPY $vgpr4_vgpr5_vgpr6_vgpr7 57 %2:_(<2 x s64>) = COPY $vgpr8_vgpr9_vgpr10_vgpr11 58 %3:_(<2 x s64>) = G_FMAD %0, %1, %2 59 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %3 60... 61 62--- 63name: test_fmad_s64_denorm 64machineFunctionInfo: 65 mode: 66 fp64-fp16-input-denormals: true 67 fp64-fp16-output-denormals: true 68 69body: | 70 bb.0: 71 liveins: $vgpr0_vgpr1, $vgpr2_vgpr3, $vgpr4_vgpr5 72 73 ; CHECK-LABEL: name: test_fmad_s64_denorm 74 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1 75 ; CHECK: [[COPY1:%[0-9]+]]:_(s64) = COPY $vgpr2_vgpr3 76 ; CHECK: [[COPY2:%[0-9]+]]:_(s64) = COPY $vgpr4_vgpr5 77 ; CHECK: [[FMUL:%[0-9]+]]:_(s64) = G_FMUL [[COPY]], [[COPY1]] 78 ; CHECK: [[FADD:%[0-9]+]]:_(s64) = G_FADD [[FMUL]], [[COPY2]] 79 ; CHECK: $vgpr0_vgpr1 = COPY [[FADD]](s64) 80 %0:_(s64) = COPY $vgpr0_vgpr1 81 %1:_(s64) = COPY $vgpr2_vgpr3 82 %2:_(s64) = COPY $vgpr4_vgpr5 83 %3:_(s64) = G_FMAD %0, %1, %2 84 $vgpr0_vgpr1 = COPY %3 85... 86 87--- 88name: test_fmad_v2s64_denorm 89machineFunctionInfo: 90 mode: 91 fp64-fp16-input-denormals: true 92 fp64-fp16-output-denormals: true 93 94body: | 95 bb.0: 96 liveins: $vgpr0_vgpr1_vgpr2_vgpr3, $vgpr4_vgpr5_vgpr6_vgpr7, $vgpr8_vgpr9_vgpr10_vgpr11 97 98 ; CHECK-LABEL: name: test_fmad_v2s64_denorm 99 ; CHECK: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3 100 ; CHECK: [[COPY1:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr4_vgpr5_vgpr6_vgpr7 101 ; CHECK: [[COPY2:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr8_vgpr9_vgpr10_vgpr11 102 ; CHECK: [[UV:%[0-9]+]]:_(s64), [[UV1:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY]](<2 x s64>) 103 ; CHECK: [[UV2:%[0-9]+]]:_(s64), [[UV3:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY1]](<2 x s64>) 104 ; CHECK: [[UV4:%[0-9]+]]:_(s64), [[UV5:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY2]](<2 x s64>) 105 ; CHECK: [[FMUL:%[0-9]+]]:_(s64) = G_FMUL [[UV]], [[UV2]] 106 ; CHECK: [[FADD:%[0-9]+]]:_(s64) = G_FADD [[FMUL]], [[UV4]] 107 ; CHECK: [[FMUL1:%[0-9]+]]:_(s64) = G_FMUL [[UV1]], [[UV3]] 108 ; CHECK: [[FADD1:%[0-9]+]]:_(s64) = G_FADD [[FMUL1]], [[UV5]] 109 ; CHECK: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[FADD]](s64), [[FADD1]](s64) 110 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[BUILD_VECTOR]](<2 x s64>) 111 %0:_(<2 x s64>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3 112 %1:_(<2 x s64>) = COPY $vgpr4_vgpr5_vgpr6_vgpr7 113 %2:_(<2 x s64>) = COPY $vgpr8_vgpr9_vgpr10_vgpr11 114 %3:_(<2 x s64>) = G_FMAD %0, %1, %2 115 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %3 116... 117