192 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -mtriple=riscv64 -run-pass=legalizer %s -o - \3# RUN: | FileCheck %s4---5name: and_i86body: |7 bb.0.entry:8 ; CHECK-LABEL: name: and_i89 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x1010 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1111 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[COPY1]]12 ; CHECK-NEXT: $x10 = COPY [[AND]](s64)13 ; CHECK-NEXT: PseudoRET implicit $x1014 %0:_(s64) = COPY $x1015 %1:_(s64) = COPY $x1116 %2:_(s8) = G_TRUNC %0(s64)17 %3:_(s8) = G_TRUNC %1(s64)18 %4:_(s8) = G_AND %2, %319 %5:_(s64) = G_ANYEXT %4(s8)20 $x10 = COPY %5(s64)21 PseudoRET implicit $x1022 23...24---25name: and_i1526body: |27 bb.0.entry:28 ; CHECK-LABEL: name: and_i1529 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x1030 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1131 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[COPY1]]32 ; CHECK-NEXT: $x10 = COPY [[AND]](s64)33 ; CHECK-NEXT: PseudoRET implicit $x1034 %0:_(s64) = COPY $x1035 %1:_(s64) = COPY $x1136 %2:_(s15) = G_TRUNC %0(s64)37 %3:_(s15) = G_TRUNC %1(s64)38 %4:_(s15) = G_AND %2, %339 %5:_(s64) = G_ANYEXT %4(s15)40 $x10 = COPY %5(s64)41 PseudoRET implicit $x1042 43...44---45name: and_i1646body: |47 bb.0.entry:48 ; CHECK-LABEL: name: and_i1649 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x1050 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1151 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[COPY1]]52 ; CHECK-NEXT: $x10 = COPY [[AND]](s64)53 ; CHECK-NEXT: PseudoRET implicit $x1054 %0:_(s64) = COPY $x1055 %1:_(s64) = COPY $x1156 %2:_(s16) = G_TRUNC %0(s64)57 %3:_(s16) = G_TRUNC %1(s64)58 %4:_(s16) = G_AND %2, %359 %5:_(s64) = G_ANYEXT %4(s16)60 $x10 = COPY %5(s64)61 PseudoRET implicit $x1062 63...64---65name: and_i3266body: |67 bb.0.entry:68 ; CHECK-LABEL: name: and_i3269 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x1070 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1171 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[COPY1]]72 ; CHECK-NEXT: $x10 = COPY [[AND]](s64)73 ; CHECK-NEXT: PseudoRET implicit $x1074 %0:_(s64) = COPY $x1075 %1:_(s64) = COPY $x1176 %2:_(s32) = G_TRUNC %0(s64)77 %3:_(s32) = G_TRUNC %1(s64)78 %4:_(s32) = G_AND %2, %379 %5:_(s64) = G_ANYEXT %4(s32)80 $x10 = COPY %5(s64)81 PseudoRET implicit $x1082 83...84---85name: and_i6486body: |87 bb.0.entry:88 ; CHECK-LABEL: name: and_i6489 ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x1090 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1191 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY]], [[COPY1]]92 ; CHECK-NEXT: $x10 = COPY [[AND]](s64)93 ; CHECK-NEXT: PseudoRET implicit $x1094 %0:_(s64) = COPY $x1095 %1:_(s64) = COPY $x1196 %2:_(s64) = G_AND %0, %197 $x10 = COPY %2(s64)98 PseudoRET implicit $x1099 100...101---102name: and_i72103body: |104 bb.0.entry:105 ; CHECK-LABEL: name: and_i72106 ; CHECK: %x00:_(s64) = COPY $x10107 ; CHECK-NEXT: %x01:_(s64) = COPY $x11108 ; CHECK-NEXT: %y00:_(s64) = COPY $x12109 ; CHECK-NEXT: %y01:_(s64) = COPY $x13110 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND %x00, %y00111 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND %x01, %y01112 ; CHECK-NEXT: $x10 = COPY [[AND]](s64)113 ; CHECK-NEXT: $x11 = COPY [[AND1]](s64)114 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11115 %x00:_(s64) = COPY $x10116 %x01:_(s64) = COPY $x11117 %y00:_(s64) = COPY $x12118 %y01:_(s64) = COPY $x13119 %x0:_(s128) = G_MERGE_VALUES %x00(s64), %x01120 %y0:_(s128) = G_MERGE_VALUES %y00(s64), %y01121 %x:_(s72) = G_TRUNC %x0(s128)122 %y:_(s72) = G_TRUNC %y0(s128)123 %z:_(s72) = G_AND %x, %y124 %z0:_(s128) = G_ANYEXT %z(s72)125 %z00:_(s64), %z01:_(s64) = G_UNMERGE_VALUES %z0(s128)126 $x10 = COPY %z00(s64)127 $x11 = COPY %z01(s64)128 PseudoRET implicit $x10, implicit $x11129 130...131---132name: and_i128133body: |134 bb.0.entry:135 ; CHECK-LABEL: name: and_i128136 ; CHECK: %lo1:_(s64) = COPY $x10137 ; CHECK-NEXT: %hi1:_(s64) = COPY $x11138 ; CHECK-NEXT: %lo2:_(s64) = COPY $x12139 ; CHECK-NEXT: %hi2:_(s64) = COPY $x13140 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND %lo1, %lo2141 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND %hi1, %hi2142 ; CHECK-NEXT: $x10 = COPY [[AND]](s64)143 ; CHECK-NEXT: $x11 = COPY [[AND1]](s64)144 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11145 %lo1:_(s64) = COPY $x10146 %hi1:_(s64) = COPY $x11147 %lo2:_(s64) = COPY $x12148 %hi2:_(s64) = COPY $x13149 %x1:_(s128) = G_MERGE_VALUES %lo1(s64), %hi1(s64)150 %x2:_(s128) = G_MERGE_VALUES %lo2(s64), %hi2(s64)151 %y:_(s128) = G_AND %x1, %x2152 %loy:_(s64), %hiy:_(s64) = G_UNMERGE_VALUES %y(s128)153 $x10 = COPY %loy(s64)154 $x11 = COPY %hiy(s64)155 PseudoRET implicit $x10, implicit $x11156 157...158---159name: and_i192160body: |161 bb.0.entry:162 ; CHECK-LABEL: name: and_i192163 ; CHECK: %lo1:_(s64) = COPY $x10164 ; CHECK-NEXT: %mid1:_(s64) = COPY $x11165 ; CHECK-NEXT: %hi1:_(s64) = COPY $x12166 ; CHECK-NEXT: %lo2:_(s64) = COPY $x13167 ; CHECK-NEXT: %mid2:_(s64) = COPY $x14168 ; CHECK-NEXT: %hi2:_(s64) = COPY $x15169 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND %lo1, %lo2170 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s64) = G_AND %mid1, %mid2171 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s64) = G_AND %hi1, %hi2172 ; CHECK-NEXT: $x10 = COPY [[AND]](s64)173 ; CHECK-NEXT: $x11 = COPY [[AND1]](s64)174 ; CHECK-NEXT: $x12 = COPY [[AND2]](s64)175 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11, implicit $x12176 %lo1:_(s64) = COPY $x10177 %mid1:_(s64) = COPY $x11178 %hi1:_(s64) = COPY $x12179 %lo2:_(s64) = COPY $x13180 %mid2:_(s64) = COPY $x14181 %hi2:_(s64) = COPY $x15182 %x1:_(s192) = G_MERGE_VALUES %lo1(s64), %mid1(s64), %hi1(s64)183 %x2:_(s192) = G_MERGE_VALUES %lo2(s64), %mid2(s64), %hi2(s64)184 %y:_(s192) = G_AND %x1, %x2185 %lo:_(s64), %mid:_(s64), %hi:_(s64) = G_UNMERGE_VALUES %y(s192)186 $x10 = COPY %lo(s64)187 $x11 = COPY %mid(s64)188 $x12 = COPY %hi(s64)189 PseudoRET implicit $x10, implicit $x11, implicit $x12190 191...192