1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py 2# RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -O0 -run-pass=legalizer %s -o - | FileCheck %s 3 4--- 5name: test_constant_s32 6body: | 7 bb.0: 8 9 ; CHECK-LABEL: name: test_constant_s32 10 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 5 11 ; CHECK: $vgpr0 = COPY [[C]](s32) 12 %0:_(s32) = G_CONSTANT i32 5 13 $vgpr0 = COPY %0 14... 15--- 16name: test_constant_s64 17body: | 18 bb.0: 19 20 ; CHECK-LABEL: name: test_constant_s64 21 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 5 22 ; CHECK: $vgpr0_vgpr1 = COPY [[C]](s64) 23 %0:_(s64) = G_CONSTANT i64 5 24 $vgpr0_vgpr1 = COPY %0 25 26... 27 28--- 29name: test_constant_s96 30body: | 31 bb.0: 32 33 ; CHECK-LABEL: name: test_constant_s96 34 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 -4780896129847249538 35 ; CHECK: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 -547834910 36 ; CHECK: [[DEF:%[0-9]+]]:_(s96) = G_IMPLICIT_DEF 37 ; CHECK: [[INSERT:%[0-9]+]]:_(s96) = G_INSERT [[DEF]], [[C]](s64), 0 38 ; CHECK: [[INSERT1:%[0-9]+]]:_(s96) = G_INSERT [[INSERT]], [[C1]](s32), 64 39 ; CHECK: $vgpr0_vgpr1_vgpr2 = COPY [[INSERT1]](s96) 40 %0:_(s96) = G_CONSTANT i96 -10105770365747857631829412482 41 $vgpr0_vgpr1_vgpr2 = COPY %0 42 43... 44 45--- 46name: test_constant_s1 47body: | 48 bb.0: 49 50 ; CHECK-LABEL: name: test_constant_s1 51 ; CHECK: [[C:%[0-9]+]]:_(s1) = G_CONSTANT i1 false 52 ; CHECK: S_ENDPGM 0, implicit [[C]](s1) 53 %1:_(s1) = G_CONSTANT i1 0 54 S_ENDPGM 0, implicit %1 55... 56 57--- 58name: test_constant_s7 59body: | 60 bb.0: 61 62 ; CHECK-LABEL: name: test_constant_s7 63 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 5 64 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY [[C]](s32) 65 ; CHECK: $vgpr0 = COPY [[COPY]](s32) 66 %0:_(s7) = G_CONSTANT i7 5 67 %1:_(s32) = G_ANYEXT %0 68 $vgpr0 = COPY %1 69... 70 71--- 72name: test_constant_s8 73body: | 74 bb.0: 75 76 ; CHECK-LABEL: name: test_constant_s8 77 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 5 78 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY [[C]](s32) 79 ; CHECK: $vgpr0 = COPY [[COPY]](s32) 80 %0:_(s8) = G_CONSTANT i8 5 81 %1:_(s32) = G_ANYEXT %0 82 $vgpr0 = COPY %1 83... 84 85--- 86name: test_constant_s16 87body: | 88 bb.0: 89 90 ; CHECK-LABEL: name: test_constant_s16 91 ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 5 92 ; CHECK: $vgpr0 = COPY [[C]](s32) 93 %0:_(s16) = G_CONSTANT i16 5 94 %1:_(s32) = G_ANYEXT %0 95 $vgpr0 = COPY %1 96... 97 98--- 99name: test_constant_s128 100body: | 101 bb.0: 102 103 ; CHECK-LABEL: name: test_constant_s128 104 ; CHECK: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 5 105 ; CHECK: [[C1:%[0-9]+]]:_(s64) = G_CONSTANT i64 0 106 ; CHECK: [[MV:%[0-9]+]]:_(s128) = G_MERGE_VALUES [[C]](s64), [[C1]](s64) 107 ; CHECK: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[MV]](s128) 108 %0:_(s128) = G_CONSTANT i128 5 109 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %0 110... 111 112--- 113name: test_constant_p0 114body: | 115 bb.0: 116 117 ; CHECK-LABEL: name: test_constant_p0 118 ; CHECK: [[C:%[0-9]+]]:_(p0) = G_CONSTANT i64 0 119 ; CHECK: $vgpr0_vgpr1 = COPY [[C]](p0) 120 %0:_(p0) = G_CONSTANT i64 0 121 $vgpr0_vgpr1 = COPY %0 122... 123 124--- 125name: test_constant_p1 126body: | 127 bb.0: 128 129 ; CHECK-LABEL: name: test_constant_p1 130 ; CHECK: [[C:%[0-9]+]]:_(p1) = G_CONSTANT i64 0 131 ; CHECK: $vgpr0_vgpr1 = COPY [[C]](p1) 132 %0:_(p1) = G_CONSTANT i64 0 133 $vgpr0_vgpr1 = COPY %0 134... 135 136--- 137name: test_constant_p2 138body: | 139 bb.0: 140 141 ; CHECK-LABEL: name: test_constant_p2 142 ; CHECK: [[C:%[0-9]+]]:_(p2) = G_CONSTANT i32 0 143 ; CHECK: $vgpr0 = COPY [[C]](p2) 144 %0:_(p2) = G_CONSTANT i32 0 145 $vgpr0 = COPY %0 146... 147 148--- 149name: test_constant_p3 150body: | 151 bb.0: 152 153 ; CHECK-LABEL: name: test_constant_p3 154 ; CHECK: [[C:%[0-9]+]]:_(p2) = G_CONSTANT i32 0 155 ; CHECK: $vgpr0 = COPY [[C]](p2) 156 %0:_(p2) = G_CONSTANT i32 0 157 $vgpr0 = COPY %0 158... 159 160--- 161name: test_constant_p4 162body: | 163 bb.0: 164 165 ; CHECK-LABEL: name: test_constant_p4 166 ; CHECK: [[C:%[0-9]+]]:_(p4) = G_CONSTANT i64 0 167 ; CHECK: $vgpr0_vgpr1 = COPY [[C]](p4) 168 %0:_(p4) = G_CONSTANT i64 0 169 $vgpr0_vgpr1 = COPY %0 170... 171 172--- 173name: test_constant_p5 174body: | 175 bb.0: 176 177 ; CHECK-LABEL: name: test_constant_p5 178 ; CHECK: [[C:%[0-9]+]]:_(p5) = G_CONSTANT i32 0 179 ; CHECK: $vgpr0 = COPY [[C]](p5) 180 %0:_(p5) = G_CONSTANT i32 0 181 $vgpr0 = COPY %0 182... 183 184--- 185name: test_constant_p999 186body: | 187 bb.0: 188 189 ; CHECK-LABEL: name: test_constant_p999 190 ; CHECK: [[C:%[0-9]+]]:_(p999) = G_CONSTANT i64 0 191 ; CHECK: $vgpr0_vgpr1 = COPY [[C]](p999) 192 %0:_(p999) = G_CONSTANT i64 0 193 $vgpr0_vgpr1 = COPY %0 194... 195