File: prelegalizer-combiner-use-vector-truncate.mir

package info (click to toggle)
llvm-toolchain-21 1%3A21.1.6-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,245,028 kB
  • sloc: cpp: 7,619,726; ansic: 1,434,018; asm: 1,058,748; python: 252,740; f90: 94,671; objc: 70,685; lisp: 42,813; pascal: 18,401; sh: 8,601; ml: 5,111; perl: 4,720; makefile: 3,675; awk: 3,523; javascript: 2,409; xml: 892; fortran: 770
file content (52 lines) | stat: -rw-r--r-- 2,133 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=aarch64 -run-pass=aarch64-prelegalizer-combiner %s -o - | FileCheck %s
---
name:            test_foldable_s32
body:             |
  bb.0:
    liveins: $x0, $x1

    ; CHECK-LABEL: name: test_foldable_s32
    ; CHECK: liveins: $x0, $x1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[SRC:%src]]:_(<2 x s32>) = COPY $x1
    ; CHECK-NEXT: [[UNDEF:%[0-9]+]]:_(<2 x s32>) = G_IMPLICIT_DEF
    ; CHECK-NEXT: [[MID:%[0-9]+]]:_(<4 x s32>) = G_CONCAT_VECTORS [[SRC]](<2 x s32>), [[UNDEF]](<2 x s32>)
    ; CHECK-NEXT: [[DST:%dst]]:_(<4 x s16>) = G_TRUNC [[MID]]
    ; CHECK-NEXT: $x0 = COPY [[DST]]

    %src:_(<2 x s32>) = COPY $x1
    %a:_(s32), %b:_(s32) = G_UNMERGE_VALUES %src:_(<2 x s32>)
    %T_a:_(s16) = G_TRUNC %a:_(s32)
    %T_b:_(s16) = G_TRUNC %b:_(s32)
    %Undef:_(s16) = G_IMPLICIT_DEF
    %dst:_(<4 x s16>) = G_BUILD_VECTOR %T_a:_(s16), %T_b:_(s16), %Undef:_(s16), %Undef:_(s16)
    $x0 = COPY %dst
...
---
name:            test_unfoldable_s32
body:             |
  bb.0:
    liveins: $w0, $x1

    ; CHECK-LABEL: name: test_unfoldable_s32
    ; CHECK: liveins: $w0, $x1
    ; CHECK-NEXT: {{  $}}
    ; CHECK-NEXT: [[SRC:%src]]:_(<2 x s32>) = COPY $x1
    ; CHECK-NEXT: [[A:%a]]:_(s16), [[B:%b]]:_(s16), [[C:%c]]:_(s16), %d:_(s16) = G_UNMERGE_VALUES [[SRC]](<2 x s32>)
    ; CHECK-NEXT: [[T_A:%T_a]]:_(s8) = G_TRUNC [[A]](s16)
    ; CHECK-NEXT: [[T_B:%T_b]]:_(s8) = G_TRUNC [[B]](s16)
    ; CHECK-NEXT: [[T_C:%T_c]]:_(s8) = G_TRUNC [[C]](s16)
    ; CHECK-NEXT: [[UNDEF:%Undef]]:_(s8) = G_IMPLICIT_DEF
    ; CHECK-NEXT: [[DST:%dst]]:_(<4 x s8>) = G_BUILD_VECTOR [[T_A]](s8), [[T_B]](s8), [[T_C]](s8), [[UNDEF]](s8)
    ; CHECK-NEXT: $w0 = COPY [[DST]](<4 x s8>)
    %src:_(<2 x s32>) = COPY $x1
    %a:_(s16), %b:_(s16), %c:_(s16), %d:_(s16) = G_UNMERGE_VALUES %src:_(<2 x s32>)
    %T_a:_(s8) = G_TRUNC %a:_(s16)
    %T_b:_(s8) = G_TRUNC %b:_(s16)
    %T_c:_(s8) = G_TRUNC %c:_(s16)
    %Undef:_(s8) = G_IMPLICIT_DEF
    %dst:_(<4 x s8>) = G_BUILD_VECTOR %T_a:_(s8), %T_b:_(s8), %T_c:_(s8), %Undef:_(s8)
    $w0 = COPY %dst

...