172 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py2# RUN: llc -mtriple=riscv32 -run-pass=legalizer %s -o - \3# RUN: | FileCheck %s4---5name: and_i76body: |7 bb.0.entry:8 ; CHECK-LABEL: name: and_i79 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x1010 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x1111 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[COPY1]]12 ; CHECK-NEXT: $x10 = COPY [[AND]](s32)13 ; CHECK-NEXT: PseudoRET implicit $x1014 %0:_(s32) = COPY $x1015 %1:_(s32) = COPY $x1116 %2:_(s7) = G_TRUNC %0(s32)17 %3:_(s7) = G_TRUNC %1(s32)18 %4:_(s7) = G_AND %2, %319 %5:_(s32) = G_ANYEXT %4(s7)20 $x10 = COPY %5(s32)21 PseudoRET implicit $x1022 23...24---25name: and_i826body: |27 bb.0.entry:28 ; CHECK-LABEL: name: and_i829 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x1030 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x1131 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[COPY1]]32 ; CHECK-NEXT: $x10 = COPY [[AND]](s32)33 ; CHECK-NEXT: PseudoRET implicit $x1034 %0:_(s32) = COPY $x1035 %1:_(s32) = COPY $x1136 %2:_(s8) = G_TRUNC %0(s32)37 %3:_(s8) = G_TRUNC %1(s32)38 %4:_(s8) = G_AND %2, %339 %5:_(s32) = G_ANYEXT %4(s8)40 $x10 = COPY %5(s32)41 PseudoRET implicit $x1042 43...44---45name: and_i1646body: |47 bb.0.entry:48 ; CHECK-LABEL: name: and_i1649 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x1050 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x1151 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[COPY1]]52 ; CHECK-NEXT: $x10 = COPY [[AND]](s32)53 ; CHECK-NEXT: PseudoRET implicit $x1054 %0:_(s32) = COPY $x1055 %1:_(s32) = COPY $x1156 %2:_(s16) = G_TRUNC %0(s32)57 %3:_(s16) = G_TRUNC %1(s32)58 %4:_(s16) = G_AND %2, %359 %5:_(s32) = G_ANYEXT %4(s16)60 $x10 = COPY %5(s32)61 PseudoRET implicit $x1062 63...64---65name: and_i3266body: |67 bb.0.entry:68 ; CHECK-LABEL: name: and_i3269 ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x1070 ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x1171 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[COPY1]]72 ; CHECK-NEXT: $x10 = COPY [[AND]](s32)73 ; CHECK-NEXT: PseudoRET implicit $x1074 %0:_(s32) = COPY $x1075 %1:_(s32) = COPY $x1176 %2:_(s32) = G_AND %0, %177 $x10 = COPY %2(s32)78 PseudoRET implicit $x1079 80...81---82name: and_i4883body: |84 bb.0.entry:85 ; CHECK-LABEL: name: and_i4886 ; CHECK: %xlo:_(s32) = COPY $x1087 ; CHECK-NEXT: %xhi:_(s32) = COPY $x1188 ; CHECK-NEXT: %ylo:_(s32) = COPY $x1289 ; CHECK-NEXT: %yhi:_(s32) = COPY $x1390 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND %xlo, %ylo91 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND %xhi, %yhi92 ; CHECK-NEXT: $x10 = COPY [[AND]](s32)93 ; CHECK-NEXT: $x11 = COPY [[AND1]](s32)94 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x1195 %xlo:_(s32) = COPY $x1096 %xhi:_(s32) = COPY $x1197 %ylo:_(s32) = COPY $x1298 %yhi:_(s32) = COPY $x1399 %x0:_(s64) = G_MERGE_VALUES %xlo(s32), %xhi(s32)100 %y0:_(s64) = G_MERGE_VALUES %ylo(s32), %yhi(s32)101 %x:_(s48) = G_TRUNC %x0(s64)102 %y:_(s48) = G_TRUNC %y0(s64)103 %z:_(s48) = G_AND %x, %y104 %z0:_(s64) = G_ANYEXT %z(s48)105 %zlo:_(s32), %zhi:_(s32) = G_UNMERGE_VALUES %z0(s64)106 $x10 = COPY %zlo(s32)107 $x11 = COPY %zhi(s32)108 PseudoRET implicit $x10, implicit $x11109 110...111---112name: and_i64113body: |114 bb.0.entry:115 ; CHECK-LABEL: name: and_i64116 ; CHECK: %lo1:_(s32) = COPY $x10117 ; CHECK-NEXT: %hi1:_(s32) = COPY $x11118 ; CHECK-NEXT: %lo2:_(s32) = COPY $x12119 ; CHECK-NEXT: %hi2:_(s32) = COPY $x13120 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND %lo1, %lo2121 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND %hi1, %hi2122 ; CHECK-NEXT: $x10 = COPY [[AND]](s32)123 ; CHECK-NEXT: $x11 = COPY [[AND1]](s32)124 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11125 %lo1:_(s32) = COPY $x10126 %hi1:_(s32) = COPY $x11127 %lo2:_(s32) = COPY $x12128 %hi2:_(s32) = COPY $x13129 %x1:_(s64) = G_MERGE_VALUES %lo1(s32), %hi1(s32)130 %x2:_(s64) = G_MERGE_VALUES %lo2(s32), %hi2(s32)131 %y:_(s64) = G_AND %x1, %x2132 %loy:_(s32), %hiy:_(s32) = G_UNMERGE_VALUES %y(s64)133 $x10 = COPY %loy(s32)134 $x11 = COPY %hiy(s32)135 PseudoRET implicit $x10, implicit $x11136 137...138---139name: and_i96140body: |141 bb.0.entry:142 ; CHECK-LABEL: name: and_i96143 ; CHECK: %lo1:_(s32) = COPY $x10144 ; CHECK-NEXT: %mid1:_(s32) = COPY $x11145 ; CHECK-NEXT: %hi1:_(s32) = COPY $x12146 ; CHECK-NEXT: %lo2:_(s32) = COPY $x13147 ; CHECK-NEXT: %mid2:_(s32) = COPY $x14148 ; CHECK-NEXT: %hi2:_(s32) = COPY $x15149 ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND %lo1, %lo2150 ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND %mid1, %mid2151 ; CHECK-NEXT: [[AND2:%[0-9]+]]:_(s32) = G_AND %hi1, %hi2152 ; CHECK-NEXT: $x10 = COPY [[AND]](s32)153 ; CHECK-NEXT: $x11 = COPY [[AND1]](s32)154 ; CHECK-NEXT: $x12 = COPY [[AND2]](s32)155 ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11, implicit $x12156 %lo1:_(s32) = COPY $x10157 %mid1:_(s32) = COPY $x11158 %hi1:_(s32) = COPY $x12159 %lo2:_(s32) = COPY $x13160 %mid2:_(s32) = COPY $x14161 %hi2:_(s32) = COPY $x15162 %x1:_(s96) = G_MERGE_VALUES %lo1(s32), %mid1(s32), %hi1(s32)163 %x2:_(s96) = G_MERGE_VALUES %lo2(s32), %mid2(s32), %hi2(s32)164 %y:_(s96) = G_AND %x1, %x2165 %lo:_(s32), %mid:_(s32), %hi:_(s32) = G_UNMERGE_VALUES %y(s96)166 $x10 = COPY %lo(s32)167 $x11 = COPY %mid(s32)168 $x12 = COPY %hi(s32)169 PseudoRET implicit $x10, implicit $x11, implicit $x12170 171...172