brintos

brintos / llvm-project-archived public Read only

0
0
Text · 9.4 KiB · 7ecb79d Raw
257 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:            select_i86body:             |7  bb.0.entry:8    ; CHECK-LABEL: name: select_i89    ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x1010    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1111    ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s64) = COPY $x1212    ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s64)13    ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s64)14    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 115    ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY2]], [[C]]16    ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[AND]](s64), [[TRUNC]], [[TRUNC1]]17    ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT [[SELECT]](s32)18    ; CHECK-NEXT: $x10 = COPY [[ANYEXT]](s64)19    ; CHECK-NEXT: PseudoRET implicit $x1020    %0:_(s64) = COPY $x1021    %1:_(s64) = COPY $x1122    %2:_(s64) = COPY $x1223    %3:_(s8) = G_TRUNC %0(s64)24    %4:_(s8) = G_TRUNC %1(s64)25    %5:_(s1) = G_TRUNC %2(s64)26    %6:_(s8) = G_SELECT %5(s1), %3(s8), %427    %7:_(s64) = G_ANYEXT %6(s8)28    $x10 = COPY %7(s64)29    PseudoRET implicit $x1030 31...32---33name:            select_i1534body:             |35  bb.0.entry:36    ; CHECK-LABEL: name: select_i1537    ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x1038    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1139    ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s64) = COPY $x1240    ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s64)41    ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s64)42    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 143    ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY2]], [[C]]44    ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[AND]](s64), [[TRUNC]], [[TRUNC1]]45    ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT [[SELECT]](s32)46    ; CHECK-NEXT: $x10 = COPY [[ANYEXT]](s64)47    ; CHECK-NEXT: PseudoRET implicit $x1048    %0:_(s64) = COPY $x1049    %1:_(s64) = COPY $x1150    %2:_(s64) = COPY $x1251    %3:_(s15) = G_TRUNC %0(s64)52    %4:_(s15) = G_TRUNC %1(s64)53    %5:_(s1) = G_TRUNC %2(s64)54    %6:_(s15) = G_SELECT %5(s1), %3(s15), %455    %7:_(s64) = G_ANYEXT %6(s15)56    $x10 = COPY %7(s64)57    PseudoRET implicit $x1058 59...60---61name:            select_i1662body:             |63  bb.0.entry:64    ; CHECK-LABEL: name: select_i1665    ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x1066    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1167    ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s64) = COPY $x1268    ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s64)69    ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s64)70    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 171    ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY2]], [[C]]72    ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[AND]](s64), [[TRUNC]], [[TRUNC1]]73    ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT [[SELECT]](s32)74    ; CHECK-NEXT: $x10 = COPY [[ANYEXT]](s64)75    ; CHECK-NEXT: PseudoRET implicit $x1076    %0:_(s64) = COPY $x1077    %1:_(s64) = COPY $x1178    %2:_(s64) = COPY $x1279    %3:_(s16) = G_TRUNC %0(s64)80    %4:_(s16) = G_TRUNC %1(s64)81    %5:_(s1) = G_TRUNC %2(s64)82    %6:_(s16) = G_SELECT %5(s1), %3(s16), %483    %7:_(s64) = G_ANYEXT %6(s16)84    $x10 = COPY %7(s64)85    PseudoRET implicit $x1086 87...88---89name:            select_i3290body:             |91  bb.0.entry:92    ; CHECK-LABEL: name: select_i3293    ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x1094    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x1195    ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s64) = COPY $x1296    ; CHECK-NEXT: [[TRUNC:%[0-9]+]]:_(s32) = G_TRUNC [[COPY]](s64)97    ; CHECK-NEXT: [[TRUNC1:%[0-9]+]]:_(s32) = G_TRUNC [[COPY1]](s64)98    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 199    ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY2]], [[C]]100    ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s32) = G_SELECT [[AND]](s64), [[TRUNC]], [[TRUNC1]]101    ; CHECK-NEXT: [[ANYEXT:%[0-9]+]]:_(s64) = G_ANYEXT [[SELECT]](s32)102    ; CHECK-NEXT: $x10 = COPY [[ANYEXT]](s64)103    ; CHECK-NEXT: PseudoRET implicit $x10104    %0:_(s64) = COPY $x10105    %1:_(s64) = COPY $x11106    %2:_(s64) = COPY $x12107    %3:_(s32) = G_TRUNC %0(s64)108    %4:_(s32) = G_TRUNC %1(s64)109    %5:_(s1) = G_TRUNC %2(s64)110    %6:_(s32) = G_SELECT %5(s1), %3(s32), %4111    %7:_(s64) = G_ANYEXT %6(s32)112    $x10 = COPY %7(s64)113    PseudoRET implicit $x10114 115...116---117name:            select_i64118body:             |119  bb.0.entry:120    ; CHECK-LABEL: name: select_i64121    ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10122    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11123    ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s64) = COPY $x12124    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 1125    ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY2]], [[C]]126    ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s64) = G_SELECT [[AND]](s64), [[COPY]], [[COPY1]]127    ; CHECK-NEXT: $x10 = COPY [[SELECT]](s64)128    ; CHECK-NEXT: PseudoRET implicit $x10129    %0:_(s64) = COPY $x10130    %1:_(s64) = COPY $x11131    %2:_(s64) = COPY $x12132    %3:_(s1) = G_TRUNC %2(s64)133    %4:_(s64) = G_SELECT %3(s1), %0(s64), %1(s64)134    $x10 = COPY %4(s64)135    PseudoRET implicit $x10136 137...138---139name:            select_i72140body:             |141  bb.0.entry:142    ; CHECK-LABEL: name: select_i72143    ; CHECK: %xhi:_(s64) = COPY $x10144    ; CHECK-NEXT: %xlo:_(s64) = COPY $x11145    ; CHECK-NEXT: %yhi:_(s64) = COPY $x12146    ; CHECK-NEXT: %ylo:_(s64) = COPY $x13147    ; CHECK-NEXT: %c0:_(s64) = COPY $x14148    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 1149    ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND %c0, [[C]]150    ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s64) = G_SELECT [[AND]](s64), %xhi, %yhi151    ; CHECK-NEXT: [[SELECT1:%[0-9]+]]:_(s64) = G_SELECT [[AND]](s64), %xlo, %ylo152    ; CHECK-NEXT: $x10 = COPY [[SELECT]](s64)153    ; CHECK-NEXT: $x11 = COPY [[SELECT1]](s64)154    ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11155    %xhi:_(s64) = COPY $x10156    %xlo:_(s64) = COPY $x11157    %yhi:_(s64) = COPY $x12158    %ylo:_(s64) = COPY $x13159    %c0:_(s64) = COPY $x14160    %x0:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)161    %y0:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)162    %x:_(s72) = G_TRUNC %x0(s128)163    %y:_(s72) = G_TRUNC %y0(s128)164    %c:_(s1) = G_TRUNC %c0(s64)165    %z:_(s72) = G_SELECT %c(s1), %x(s72), %y166    %z0:_(s128) = G_ANYEXT %z(s72)167    %zhi:_(s64), %zlo:_(s64) = G_UNMERGE_VALUES %z0(s128)168    $x10 = COPY %zhi(s64)169    $x11 = COPY %zlo(s64)170    PseudoRET implicit $x10, implicit $x11171 172...173---174name:            select_i128175body:             |176  bb.0.entry:177    ; CHECK-LABEL: name: select_i128178    ; CHECK: %xhi:_(s64) = COPY $x10179    ; CHECK-NEXT: %xlo:_(s64) = COPY $x11180    ; CHECK-NEXT: %yhi:_(s64) = COPY $x12181    ; CHECK-NEXT: %ylo:_(s64) = COPY $x13182    ; CHECK-NEXT: %c0:_(s64) = COPY $x14183    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 1184    ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND %c0, [[C]]185    ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(s64) = G_SELECT [[AND]](s64), %xhi, %yhi186    ; CHECK-NEXT: [[SELECT1:%[0-9]+]]:_(s64) = G_SELECT [[AND]](s64), %xlo, %ylo187    ; CHECK-NEXT: $x10 = COPY [[SELECT]](s64)188    ; CHECK-NEXT: $x11 = COPY [[SELECT1]](s64)189    ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11190    %xhi:_(s64) = COPY $x10191    %xlo:_(s64) = COPY $x11192    %yhi:_(s64) = COPY $x12193    %ylo:_(s64) = COPY $x13194    %c0:_(s64) = COPY $x14195    %x:_(s128) = G_MERGE_VALUES %xhi(s64), %xlo(s64)196    %y:_(s128) = G_MERGE_VALUES %yhi(s64), %ylo(s64)197    %c:_(s1) = G_TRUNC %c0(s64)198    %z:_(s128) = G_SELECT %c(s1), %x(s128), %y199    %zhi:_(s64), %zlo:_(s64) = G_UNMERGE_VALUES %z(s128)200    $x10 = COPY %zhi(s64)201    $x11 = COPY %zlo(s64)202    PseudoRET implicit $x10, implicit $x11203 204...205---206name:            select_i192207body:             |208  bb.0.entry:209    ; CHECK-LABEL: name: select_i192210    ; CHECK: %yhi:_(s64) = COPY $x13211    ; CHECK-NEXT: %ymid:_(s64) = COPY $x14212    ; CHECK-NEXT: %ylo:_(s64) = COPY $x15213    ; CHECK-NEXT: $x10 = COPY %yhi(s64)214    ; CHECK-NEXT: $x11 = COPY %ymid(s64)215    ; CHECK-NEXT: $x12 = COPY %ylo(s64)216    ; CHECK-NEXT: PseudoRET implicit $x10, implicit $x11, implicit $x12217    %xhi:_(s64) = COPY $x10218    %xmid:_(s64) = COPY $x11219    %xlo:_(s64) = COPY $x12220    %yhi:_(s64) = COPY $x13221    %ymid:_(s64) = COPY $x14222    %ylo:_(s64) = COPY $x15223    %c0:_(s64) = COPY $x16224    %x:_(s192) = G_MERGE_VALUES %xhi(s64), %xmid(s64), %xlo(s64)225    %y:_(s192) = G_MERGE_VALUES %yhi(s64), %ymid(s64), %ylo(s64)226    %c:_(s1) = G_TRUNC %c0(s64)227    %z:_(s192) = G_SELECT %c(s1), %x(s192), %y228    %zhi:_(s64), %zmid:_(s64), %zlo:_(s64) = G_UNMERGE_VALUES %y(s192)229    $x10 = COPY %zhi(s64)230    $x11 = COPY %zmid(s64)231    $x12 = COPY %zlo(s64)232    PseudoRET implicit $x10, implicit $x11, implicit $x12233 234...235---236name:            select_ptr237body:             |238  bb.0.entry:239    ; CHECK-LABEL: name: select_ptr240    ; CHECK: [[COPY:%[0-9]+]]:_(p0) = COPY $x10241    ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(p0) = COPY $x11242    ; CHECK-NEXT: [[COPY2:%[0-9]+]]:_(s64) = COPY $x12243    ; CHECK-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 1244    ; CHECK-NEXT: [[AND:%[0-9]+]]:_(s64) = G_AND [[COPY2]], [[C]]245    ; CHECK-NEXT: [[SELECT:%[0-9]+]]:_(p0) = G_SELECT [[AND]](s64), [[COPY]], [[COPY1]]246    ; CHECK-NEXT: $x10 = COPY [[SELECT]](p0)247    ; CHECK-NEXT: PseudoRET implicit $x10248    %0:_(p0) = COPY $x10249    %1:_(p0) = COPY $x11250    %2:_(s64) = COPY $x12251    %3:_(s1) = G_TRUNC %2(s64)252    %4:_(p0) = G_SELECT %3(s1), %0(p0), %1(p0)253    $x10 = COPY %4(p0)254    PseudoRET implicit $x10255 256...257