1# RUN: llc -O0 -run-pass=legalizer -global-isel-abort=0 -pass-remarks-missed='gisel*' %s -o - 2>&1 | FileCheck %s
2
3--- |
4  target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
5  target triple = "aarch64--"
6  define void @test_merge_s4() {
7    ret void
8  }
9...
10
11---
12name:            test_merge_s4
13registers:
14  - { id: 0, class: _ }
15  - { id: 1, class: _ }
16  - { id: 2, class: _ }
17  - { id: 3, class: _ }
18  - { id: 4, class: _ }
19body: |
20  bb.0:
21    %0(s64) = G_CONSTANT i64 0
22    %1(s4) = G_TRUNC %0(s64)
23    ; Previously, LegalizerInfo was assuming all G_MERGE_VALUES and G_UNMERGE_VALUES
24    ; instructions are legal. Make sure that is no longer happening.
25    ; CHECK: unable to legalize instruction: {{.*}} G_MERGE_VALUES
26    %2(s8) = G_MERGE_VALUES %1(s4), %1(s4)
27    %3(s8) = COPY %2(s8)
28    %4(s64) = G_ANYEXT %3(s8)
29    $x0 = COPY %4(s64)
30...
31