brintos

brintos / llvm-project-archived public Read only

0
0
Text · 12.2 KiB · 71d7e83 Raw
260 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:            lshr_i76body:             |7  bb.0.entry:8    ; CHECK-LABEL: name: lshr_i79    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x1010    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x1111    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 12712    ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]13    ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]14    ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[AND1]], [[AND]](s32)15    ; CHECK-NEXT: $x10 = COPY [[LSHR]](s32)16    ; CHECK-NEXT: PseudoRET implicit $x1017    %0:_(s32) = COPY $x1018    %1:_(s32) = COPY $x1119    %2:_(s7) = G_TRUNC %0(s32)20    %3:_(s7) = G_TRUNC %1(s32)21    %4:_(s7) = G_LSHR %2, %322    %5:_(s32) = G_ANYEXT %4(s7)23    $x10 = COPY %5(s32)24    PseudoRET implicit $x1025 26...27---28name:            lshr_i829body:             |30  bb.0.entry:31    ; CHECK-LABEL: name: lshr_i832    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x1033    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x1134    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 25535    ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]36    ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]37    ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[AND1]], [[AND]](s32)38    ; CHECK-NEXT: $x10 = COPY [[LSHR]](s32)39    ; CHECK-NEXT: PseudoRET implicit $x1040    %0:_(s32) = COPY $x1041    %1:_(s32) = COPY $x1142    %2:_(s8) = G_TRUNC %0(s32)43    %3:_(s8) = G_TRUNC %1(s32)44    %4:_(s8) = G_LSHR %2, %345    %5:_(s32) = G_ANYEXT %4(s8)46    $x10 = COPY %5(s32)47    PseudoRET implicit $x1048 49...50---51name:            lshr_i1652body:             |53  bb.0.entry:54    ; CHECK-LABEL: name: lshr_i1655    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x1056    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x1157    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 6553558    ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND [[COPY1]], [[C]]59    ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND [[COPY]], [[C]]60    ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[AND1]], [[AND]](s32)61    ; CHECK-NEXT: $x10 = COPY [[LSHR]](s32)62    ; CHECK-NEXT: PseudoRET implicit $x1063    %0:_(s32) = COPY $x1064    %1:_(s32) = COPY $x1165    %2:_(s16) = G_TRUNC %0(s32)66    %3:_(s16) = G_TRUNC %1(s32)67    %4:_(s16) = G_LSHR %2, %368    %5:_(s32) = G_ANYEXT %4(s16)69    $x10 = COPY %5(s32)70    PseudoRET implicit $x1071 72...73---74name:            lshr_i3275body:             |76  bb.0.entry:77    ; CHECK-LABEL: name: lshr_i3278    ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $x1079    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s32) = COPY $x1180    ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[COPY]], [[COPY1]](s32)81    ; CHECK-NEXT: $x10 = COPY [[LSHR]](s32)82    ; CHECK-NEXT: PseudoRET implicit $x1083    %0:_(s32) = COPY $x1084    %1:_(s32) = COPY $x1185    %2:_(s32) = G_LSHR %0, %186    $x10 = COPY %2(s32)87    PseudoRET implicit $x1088 89...90---91name:            lshr_i4892body:             |93  bb.0.entry:94    ; CHECK-LABEL: name: lshr_i4895    ; CHECK: %xlo:_(s32) = COPY $x1096    ; CHECK-NEXT: %xhi:_(s32) = COPY $x1197    ; CHECK-NEXT: %ylo:_(s32) = COPY $x1298    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 -199    ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 65535100    ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s32) = G_AND %xlo, [[C]]101    ; CHECK-NEXT: [[AND1:%[0-9]+]]:_(s32) = G_AND %xhi, [[C1]]102    ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 32103    ; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s32) = G_SUB %ylo, [[C2]]104    ; CHECK-NEXT: [[SUB1:%[0-9]+]]:_(s32) = G_SUB [[C2]], %ylo105    ; CHECK-NEXT: [[C3:%[0-9]+]]:_(s32) = G_CONSTANT i32 0106    ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), %ylo(s32), [[C2]]107    ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), %ylo(s32), [[C3]]108    ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR [[AND1]], %ylo(s32)109    ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[AND]], %ylo(s32)110    ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[AND1]], [[SUB1]](s32)111    ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[LSHR1]], [[SHL]]112    ; CHECK-NEXT: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR [[AND1]], [[SUB]](s32)113    ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP]](s32), [[OR]], [[LSHR2]]114    ; CHECK-NEXT: [[SELECT1:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s32), [[AND]], [[SELECT]]115    ; CHECK-NEXT: [[SELECT2:%[0-9]+]]:_(s32) = G_SELECT [[ICMP]](s32), [[LSHR]], [[C3]]116    ; CHECK-NEXT: $x10 = COPY [[SELECT1]](s32)117    ; CHECK-NEXT: $x11 = COPY [[SELECT2]](s32)118    ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11119    %xlo:_(s32) = COPY $x10120    %xhi:_(s32) = COPY $x11121    %ylo:_(s32) = COPY $x12122    %yhi:_(s32) = COPY $x13123    %x0:_(s64) = G_MERGE_VALUES %xlo(s32), %xhi(s32)124    %y0:_(s64) = G_MERGE_VALUES %ylo(s32), %yhi(s32)125    %x:_(s48) = G_TRUNC %x0(s64)126    %y:_(s48) = G_TRUNC %y0(s64)127    %z:_(s48) = G_LSHR %x, %y128    %z0:_(s64) = G_ANYEXT %z(s48)129    %zlo:_(s32), %zhi:_(s32) = G_UNMERGE_VALUES %z0(s64)130    $x10 = COPY %zlo(s32)131    $x11 = COPY %zhi(s32)132    PseudoRET implicit $x10, implicit $x11133 134...135---136name:            lshr_i64137body:             |138  bb.0.entry:139    ; CHECK-LABEL: name: lshr_i64140    ; CHECK: %lo1:_(s32) = COPY $x10141    ; CHECK-NEXT: %hi1:_(s32) = COPY $x11142    ; CHECK-NEXT: %lo2:_(s32) = COPY $x12143    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 32144    ; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s32) = G_SUB %lo2, [[C]]145    ; CHECK-NEXT: [[SUB1:%[0-9]+]]:_(s32) = G_SUB [[C]], %lo2146    ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 0147    ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), %lo2(s32), [[C]]148    ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), %lo2(s32), [[C1]]149    ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR %hi1, %lo2(s32)150    ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR %lo1, %lo2(s32)151    ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL %hi1, [[SUB1]](s32)152    ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[LSHR1]], [[SHL]]153    ; CHECK-NEXT: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR %hi1, [[SUB]](s32)154    ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP]](s32), [[OR]], [[LSHR2]]155    ; CHECK-NEXT: [[SELECT1:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s32), %lo1, [[SELECT]]156    ; CHECK-NEXT: [[SELECT2:%[0-9]+]]:_(s32) = G_SELECT [[ICMP]](s32), [[LSHR]], [[C1]]157    ; CHECK-NEXT: $x10 = COPY [[SELECT1]](s32)158    ; CHECK-NEXT: $x11 = COPY [[SELECT2]](s32)159    ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11160    %lo1:_(s32) = COPY $x10161    %hi1:_(s32) = COPY $x11162    %lo2:_(s32) = COPY $x12163    %hi2:_(s32) = COPY $x13164    %x1:_(s64) = G_MERGE_VALUES %lo1(s32), %hi1(s32)165    %x2:_(s64) = G_MERGE_VALUES %lo2(s32), %hi2(s32)166    %y:_(s64) = G_LSHR %x1, %x2167    %loy:_(s32), %hiy:_(s32) = G_UNMERGE_VALUES %y(s64)168    $x10 = COPY %loy(s32)169    $x11 = COPY %hiy(s32)170    PseudoRET implicit $x10, implicit $x11171 172...173---174name:            lshr_i96175body:             |176  bb.0.entry:177    ; CHECK-LABEL: name: lshr_i96178    ; CHECK: %lo1:_(s32) = COPY $x10179    ; CHECK-NEXT: %mid1:_(s32) = COPY $x11180    ; CHECK-NEXT: %hi1:_(s32) = COPY $x12181    ; CHECK-NEXT: %lo2:_(s32) = COPY $x13182    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0183    ; CHECK-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 64184    ; CHECK-NEXT: [[SUB:%[0-9]+]]:_(s32) = G_SUB %lo2, [[C1]]185    ; CHECK-NEXT: [[SUB1:%[0-9]+]]:_(s32) = G_SUB [[C1]], %lo2186    ; CHECK-NEXT: [[ICMP:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), %lo2(s32), [[C1]]187    ; CHECK-NEXT: [[ICMP1:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), %lo2(s32), [[C]]188    ; CHECK-NEXT: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 32189    ; CHECK-NEXT: [[SUB2:%[0-9]+]]:_(s32) = G_SUB %lo2, [[C2]]190    ; CHECK-NEXT: [[SUB3:%[0-9]+]]:_(s32) = G_SUB [[C2]], %lo2191    ; CHECK-NEXT: [[ICMP2:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), %lo2(s32), [[C2]]192    ; CHECK-NEXT: [[ICMP3:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), %lo2(s32), [[C]]193    ; CHECK-NEXT: [[LSHR:%[0-9]+]]:_(s32) = G_LSHR %hi1, %lo2(s32)194    ; CHECK-NEXT: [[SHL:%[0-9]+]]:_(s32) = G_SHL [[C]], [[SUB3]](s32)195    ; CHECK-NEXT: [[OR:%[0-9]+]]:_(s32) = G_OR [[LSHR]], [[SHL]]196    ; CHECK-NEXT: [[LSHR1:%[0-9]+]]:_(s32) = G_LSHR [[C]], [[SUB2]](s32)197    ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[ICMP2]](s32), [[OR]], [[LSHR1]]198    ; CHECK-NEXT: [[SELECT1:%[0-9]+]]:_(s32) = G_SELECT [[ICMP3]](s32), %hi1, [[SELECT]]199    ; CHECK-NEXT: [[ICMP4:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), %lo2(s32), [[C2]]200    ; CHECK-NEXT: [[ICMP5:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), %lo2(s32), [[C]]201    ; CHECK-NEXT: [[LSHR2:%[0-9]+]]:_(s32) = G_LSHR %mid1, %lo2(s32)202    ; CHECK-NEXT: [[LSHR3:%[0-9]+]]:_(s32) = G_LSHR %lo1, %lo2(s32)203    ; CHECK-NEXT: [[SHL1:%[0-9]+]]:_(s32) = G_SHL %mid1, [[SUB3]](s32)204    ; CHECK-NEXT: [[OR1:%[0-9]+]]:_(s32) = G_OR [[LSHR3]], [[SHL1]]205    ; CHECK-NEXT: [[LSHR4:%[0-9]+]]:_(s32) = G_LSHR %mid1, [[SUB2]](s32)206    ; CHECK-NEXT: [[SELECT2:%[0-9]+]]:_(s32) = G_SELECT [[ICMP4]](s32), [[OR1]], [[LSHR4]]207    ; CHECK-NEXT: [[SELECT3:%[0-9]+]]:_(s32) = G_SELECT [[ICMP5]](s32), %lo1, [[SELECT2]]208    ; CHECK-NEXT: [[SELECT4:%[0-9]+]]:_(s32) = G_SELECT [[ICMP4]](s32), [[LSHR2]], [[C]]209    ; CHECK-NEXT: [[SUB4:%[0-9]+]]:_(s32) = G_SUB [[SUB1]], [[C2]]210    ; CHECK-NEXT: [[SUB5:%[0-9]+]]:_(s32) = G_SUB [[C2]], [[SUB1]]211    ; CHECK-NEXT: [[ICMP6:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[SUB1]](s32), [[C2]]212    ; CHECK-NEXT: [[ICMP7:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[SUB1]](s32), [[C]]213    ; CHECK-NEXT: [[SHL2:%[0-9]+]]:_(s32) = G_SHL %hi1, [[SUB1]](s32)214    ; CHECK-NEXT: [[LSHR5:%[0-9]+]]:_(s32) = G_LSHR %hi1, [[SUB5]](s32)215    ; CHECK-NEXT: [[SHL3:%[0-9]+]]:_(s32) = G_SHL [[C]], [[SUB1]](s32)216    ; CHECK-NEXT: [[OR2:%[0-9]+]]:_(s32) = G_OR [[LSHR5]], [[SHL3]]217    ; CHECK-NEXT: [[SHL4:%[0-9]+]]:_(s32) = G_SHL %hi1, [[SUB4]](s32)218    ; CHECK-NEXT: [[SELECT5:%[0-9]+]]:_(s32) = G_SELECT [[ICMP6]](s32), [[SHL2]], [[C]]219    ; CHECK-NEXT: [[SELECT6:%[0-9]+]]:_(s32) = G_SELECT [[ICMP6]](s32), [[OR2]], [[SHL4]]220    ; CHECK-NEXT: [[SELECT7:%[0-9]+]]:_(s32) = G_SELECT [[ICMP7]](s32), [[C]], [[SELECT6]]221    ; CHECK-NEXT: [[OR3:%[0-9]+]]:_(s32) = G_OR [[SELECT3]], [[SELECT5]]222    ; CHECK-NEXT: [[OR4:%[0-9]+]]:_(s32) = G_OR [[SELECT4]], [[SELECT7]]223    ; CHECK-NEXT: [[SUB6:%[0-9]+]]:_(s32) = G_SUB [[SUB]], [[C2]]224    ; CHECK-NEXT: [[SUB7:%[0-9]+]]:_(s32) = G_SUB [[C2]], [[SUB]]225    ; CHECK-NEXT: [[ICMP8:%[0-9]+]]:_(s32) = G_ICMP intpred(ult), [[SUB]](s32), [[C2]]226    ; CHECK-NEXT: [[ICMP9:%[0-9]+]]:_(s32) = G_ICMP intpred(eq), [[SUB]](s32), [[C]]227    ; CHECK-NEXT: [[LSHR6:%[0-9]+]]:_(s32) = G_LSHR [[C]], [[SUB]](s32)228    ; CHECK-NEXT: [[LSHR7:%[0-9]+]]:_(s32) = G_LSHR %hi1, [[SUB]](s32)229    ; CHECK-NEXT: [[SHL5:%[0-9]+]]:_(s32) = G_SHL [[C]], [[SUB7]](s32)230    ; CHECK-NEXT: [[OR5:%[0-9]+]]:_(s32) = G_OR [[LSHR7]], [[SHL5]]231    ; CHECK-NEXT: [[LSHR8:%[0-9]+]]:_(s32) = G_LSHR [[C]], [[SUB6]](s32)232    ; CHECK-NEXT: [[SELECT8:%[0-9]+]]:_(s32) = G_SELECT [[ICMP8]](s32), [[OR5]], [[LSHR8]]233    ; CHECK-NEXT: [[SELECT9:%[0-9]+]]:_(s32) = G_SELECT [[ICMP9]](s32), %hi1, [[SELECT8]]234    ; CHECK-NEXT: [[SELECT10:%[0-9]+]]:_(s32) = G_SELECT [[ICMP8]](s32), [[LSHR6]], [[C]]235    ; CHECK-NEXT: [[SELECT11:%[0-9]+]]:_(s32) = G_SELECT [[ICMP]](s32), [[OR3]], [[SELECT9]]236    ; CHECK-NEXT: [[SELECT12:%[0-9]+]]:_(s32) = G_SELECT [[ICMP]](s32), [[OR4]], [[SELECT10]]237    ; CHECK-NEXT: [[SELECT13:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s32), %lo1, [[SELECT11]]238    ; CHECK-NEXT: [[SELECT14:%[0-9]+]]:_(s32) = G_SELECT [[ICMP1]](s32), %mid1, [[SELECT12]]239    ; CHECK-NEXT: [[SELECT15:%[0-9]+]]:_(s32) = G_SELECT [[ICMP]](s32), [[SELECT1]], [[C]]240    ; CHECK-NEXT: $x10 = COPY [[SELECT13]](s32)241    ; CHECK-NEXT: $x11 = COPY [[SELECT14]](s32)242    ; CHECK-NEXT: $x12 = COPY [[SELECT15]](s32)243    ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11, implicit $x12244    %lo1:_(s32) = COPY $x10245    %mid1:_(s32) = COPY $x11246    %hi1:_(s32) = COPY $x12247    %lo2:_(s32) = COPY $x13248    %mid2:_(s32) = COPY $x14249    %hi2:_(s32) = COPY $x15250    %x1:_(s96) = G_MERGE_VALUES %lo1(s32), %mid1(s32), %hi1(s32)251    %x2:_(s96) = G_MERGE_VALUES %lo2(s32), %mid2(s32), %hi2(s32)252    %y:_(s96) = G_LSHR %x1, %x2253    %lo:_(s32), %mid:_(s32), %hi:_(s32) = G_UNMERGE_VALUES %y(s96)254    $x10 = COPY %lo(s32)255    $x11 = COPY %mid(s32)256    $x12 = COPY %hi(s32)257    PseudoRET implicit $x10, implicit $x11, implicit $x12258 259...260