| # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py |
| # RUN: llc -mtriple=riscv64 -run-pass=legalizer %s -o - \ |
| # RUN: | FileCheck %s |
| --- |
| name: xor_i8 |
| body: | |
| bb.0.entry: |
| ; CHECK-LABEL: name: xor_i8 |
| ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x11 |
| ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s64) = G_XOR [[COPY]], [[XOR]] |
| ; CHECK-NEXT: $x10 = COPY [[XOR]](s64) |
| ; CHECK-NEXT: PseudoRET implicit $x10 |
| %0:_(s64) = COPY $x10 |
| %1:_(s64) = COPY $x11 |
| %2:_(s8) = G_TRUNC %0(s64) |
| %3:_(s8) = G_TRUNC %1(s64) |
| %4:_(s8) = G_XOR %3, %4 |
| %5:_(s64) = G_ANYEXT %4(s8) |
| $x10 = COPY %5(s64) |
| PseudoRET implicit $x10 |
| |
| ... |
| --- |
| name: xor_i16 |
| body: | |
| bb.0.entry: |
| ; CHECK-LABEL: name: xor_i16 |
| ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x11 |
| ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s64) = G_XOR [[COPY]], [[XOR]] |
| ; CHECK-NEXT: $x10 = COPY [[XOR]](s64) |
| ; CHECK-NEXT: PseudoRET implicit $x10 |
| %0:_(s64) = COPY $x10 |
| %1:_(s64) = COPY $x11 |
| %2:_(s16) = G_TRUNC %0(s64) |
| %3:_(s16) = G_TRUNC %1(s64) |
| %4:_(s16) = G_XOR %3, %4 |
| %5:_(s64) = G_ANYEXT %4(s16) |
| $x10 = COPY %5(s64) |
| PseudoRET implicit $x10 |
| |
| ... |
| --- |
| name: xor_i32 |
| body: | |
| bb.0.entry: |
| ; CHECK-LABEL: name: xor_i32 |
| ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x11 |
| ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s64) = G_XOR [[COPY]], [[XOR]] |
| ; CHECK-NEXT: $x10 = COPY [[XOR]](s64) |
| ; CHECK-NEXT: PseudoRET implicit $x10 |
| %0:_(s64) = COPY $x10 |
| %1:_(s64) = COPY $x11 |
| %2:_(s32) = G_TRUNC %0(s64) |
| %3:_(s32) = G_TRUNC %1(s64) |
| %4:_(s32) = G_XOR %3, %4 |
| %5:_(s64) = G_ANYEXT %4(s32) |
| $x10 = COPY %5(s64) |
| PseudoRET implicit $x10 |
| |
| ... |
| --- |
| name: xor_i64 |
| body: | |
| bb.0.entry: |
| ; CHECK-LABEL: name: xor_i64 |
| ; CHECK: [[COPY:%[0-9]+]]:_(s64) = COPY $x10 |
| ; CHECK-NEXT: [[COPY1:%[0-9]+]]:_(s64) = COPY $x11 |
| ; CHECK-NEXT: [[XOR:%[0-9]+]]:_(s64) = G_XOR [[COPY]], [[COPY1]] |
| ; CHECK-NEXT: $x10 = COPY [[XOR]](s64) |
| ; CHECK-NEXT: PseudoRET implicit $x10 |
| %0:_(s64) = COPY $x10 |
| %1:_(s64) = COPY $x11 |
| %2:_(s64) = G_XOR %0, %1 |
| $x10 = COPY %2(s64) |
| PseudoRET implicit $x10 |
| |
| ... |