| # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py |
| # RUN: llc -O0 -run-pass=legalizer %s -o - | FileCheck %s |
| |
| --- | |
| target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" |
| target triple = "aarch64--" |
| define void @test_unmerge() { |
| entry: |
| ret void |
| } |
| define void @test_legal_const_ext() { ret void } |
| ... |
| |
| --- |
| name: test_unmerge |
| body: | |
| bb.1: |
| liveins: $w0 |
| ; CHECK-LABEL: name: test_unmerge |
| ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0 |
| ; CHECK: $w0 = COPY [[COPY]](s32) |
| %0:_(s32) = COPY $w0 |
| %1:_(<4 x s32>) = G_BUILD_VECTOR %0(s32), %0(s32), %0(s32), %0(s32) |
| %2:_(s32), %3:_(s32), %4:_(s32), %5:_(s32) = G_UNMERGE_VALUES %1(<4 x s32>) |
| $w0 = COPY %2(s32) |
| ... |
| |
| --- |
| name: test_legal_const_ext |
| body: | |
| bb.1: |
| liveins: $w0 |
| ; CHECK-LABEL: name: test_legal_const_ext |
| ; CHECK: [[COPY:%[0-9]+]]:_(s32) = COPY $w0 |
| ; CHECK: [[COPY1:%[0-9]+]]:_(s32) = COPY [[COPY]](s32) |
| ; CHECK: [[C:%[0-9]+]]:_(s32) = G_CONSTANT i32 0 |
| ; CHECK: [[ADD:%[0-9]+]]:_(s32) = G_ADD [[COPY1]], [[C]] |
| ; CHECK: [[COPY2:%[0-9]+]]:_(s32) = COPY [[ADD]](s32) |
| ; CHECK: $w0 = COPY [[COPY2]](s32) |
| %0:_(s32) = COPY $w0 |
| %1:_(s1) = G_TRUNC %0(s32) |
| %2:_(s1) = G_CONSTANT i1 2 |
| %3:_(s1) = G_ADD %1(s1), %2(s1) |
| %4:_(s32) = G_ANYEXT %3(s1) |
| $w0 = COPY %4(s32) |
| ... |