File: compress-evex.mir

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,998,520 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (140 lines) | stat: -rw-r--r-- 6,720 bytes parent folder | download | duplicates (4)
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# RUN: llc %s -mtriple=x86_64-unknown -mattr=+ndd,+egpr -start-before=x86-compress-evex -show-mc-encoding -o - | FileCheck --check-prefixes=CHECK,NDD %s
# RUN: llc %s -mtriple=x86_64-unknown -mattr=+ndd,+egpr,+nf -start-before=x86-compress-evex -show-mc-encoding -o - | FileCheck --check-prefixes=CHECK,NDD-NF %s

...
---
name:            ndd_2_non_ndd_xor
body:             |
  bb.0.entry:
    liveins: $rdi, $rsi
    ; CHECK: xorq    %rsi, %rax                      # EVEX TO LEGACY Compression encoding: [0x48,0x31,0xf0]
    renamable $rax = ADD64rr_ND killed renamable $rdi, renamable $rsi, implicit-def dead $eflags
    renamable $rax = XOR64rr_ND killed renamable $rax, killed renamable $rsi, implicit-def dead $eflags
    RET64 $rax
...
---
name:            ndd_2_non_ndd_sub
body:             |
  bb.0.entry:
    liveins: $rdi, $rsi
    ; CHECK: subq    %rsi, %rax                      # EVEX TO LEGACY Compression encoding: [0x48,0x29,0xf0]
    renamable $rax = ADD64rr_ND killed renamable $rdi, renamable $rsi, implicit-def dead $eflags
    renamable $rax = SUB64rr_ND killed renamable $rax, killed renamable $rsi, implicit-def dead $eflags
    RET64 $rax
...
---
name:            ndd_2_non_ndd_commutable
body:             |
  bb.0.entry:
    liveins: $rdi, $rsi
    ; CHECK: xorq    %rsi, %rax                      # EVEX TO LEGACY Compression encoding: [0x48,0x31,0xf0]
    renamable $rax = ADD64rr_ND killed renamable $rdi, renamable $rsi, implicit-def dead $eflags
    renamable $rax = XOR64rr_ND killed renamable $rsi, killed renamable $rax, implicit-def dead $eflags
    RET64 $rax
...
---
name:            ndd_2_non_ndd_commutable_new_opcode
body:             |
  bb.0.entry:
    liveins: $rdi, $rsi
    ; CHECK: shldq   $52, %rsi, %rax                 # EVEX TO LEGACY Compression encoding: [0x48,0x0f,0xa4,0xf0,0x34]
    renamable $rax = ADD64rr_ND killed renamable $rdi, renamable $rsi, implicit-def dead $eflags
    renamable $rax = SHRD64rri8_ND killed renamable $rsi, killed renamable $rax, 12, implicit-def dead $eflags
    RET64 $rax
...
---
name:            ndd_2_non_ndd_incommutable
body:             |
  bb.0.entry:
    liveins: $rdi, $rsi
    ; NDD:     subq    %rax, %rsi, %rax              # encoding: [0x62,0xf4,0xfc,0x18,0x29,0xc6]
    ; NDD-NF: {nf} subq    %rax, %rsi, %rax          # EVEX TO EVEX Compression encoding: [0x62,0xf4,0xfc,0x1c,0x29,0xc6]
    renamable $rax = ADD64rr_ND killed renamable $rdi, renamable $rsi, implicit-def dead $eflags
    renamable $rax = SUB64rr_ND killed renamable $rsi, killed renamable $rax, implicit-def dead $eflags
    RET64 $rax
...
---
name:            ndd_2_non_ndd_mem
body:             |
  bb.0.entry:
    ; NDD:    addq    $123456, (%rax), %rax          # encoding: [0x62,0xf4,0xfc,0x18,0x81,0x00,0x40,0xe2,0x01,0x00]
    ; NDD-NF: {nf} addq $123456, (%rax), %rax        # EVEX TO EVEX Compression encoding: [0x62,0xf4,0xfc,0x1c,0x81,0x00,0x40,0xe2,0x01,0x00]
    renamable $rax = MOV64rm $noreg, 1, $noreg, 0, $fs
    renamable $rax = nsw ADD64mi32_ND killed renamable $rax, 1, $noreg, 0, $noreg, 123456, implicit-def dead $eflags
    RET64 $rax
...
---
name:            ndd_2_non_ndd_egpr
body:             |
  bb.0.entry:
    liveins: $rdi, $r16
    ; CHECK: xorq    %r16, %rax                      # EVEX TO LEGACY Compression encoding: [0xd5,0x48,0x31,0xc0]
    renamable $rax = ADD64rr_ND killed renamable $rdi, renamable $r16, implicit-def dead $eflags
    renamable $rax = XOR64rr_ND killed renamable $rax, killed renamable $r16, implicit-def dead $eflags
    RET64 $rax
...
---
name:            ndd_2_non_ndd_egpr_nf
body:             |
  bb.0.entry:
    liveins: $rdi, $r16
    ; CHECK: {nf} xorq %r16, %rax                   # EVEX TO EVEX Compression encoding: [0x62,0xe4,0xfc,0x0c,0x31,0xc0]
    renamable $rax = ADD64rr_ND killed renamable $rdi, renamable $r16, implicit-def dead $eflags
    renamable $rax = XOR64rr_NF_ND killed renamable $rax, killed renamable $r16
    RET64 $rax
...
---
name:            bswapr_to_movberr
body:             |
  bb.0.entry:
    liveins: $rax
    ; CHECK: bswapq  %rax                            # EVEX TO LEGACY Compression encoding: [0x48,0x0f,0xc8]
    renamable $rax = MOVBE64rr killed renamable $rax
    RET64 killed $rax
...
---
name:            non_nf_2_nf
body:             |
  bb.0.entry:
    liveins: $rdi, $r16
    ; CHECK:  addq %r16, %rdi                        # encoding: [0xd5,0x48,0x01,0xc7]
    ; NDD:    xorq %r16, %rdi, %rax                  # encoding: [0x62,0xe4,0xfc,0x18,0x31,0xc7]
    ; NDD-NF: {nf} xorq %r16, %rdi, %rax             # EVEX TO EVEX Compression encoding: [0x62,0xe4,0xfc,0x1c,0x31,0xc7]
    ; CHECK:  addq %r16, %rax, %rdi                  # encoding: [0x62,0xe4,0xc4,0x18,0x01,0xc0]
    ; CHECK:  adcq %rdi, %r16, %rax                  # encoding: [0x62,0xfc,0xfc,0x18,0x11,0xf8]
    $rdi = ADD64rr $rdi, $r16, implicit-def dead $eflags
    $rax = XOR64rr_ND $rdi, $r16, implicit-def dead $eflags
    $rdi = ADD64rr_ND $rax, $r16, implicit-def $eflags
    $rax = ADC64rr_ND $r16, $rdi, implicit-def dead $eflags, implicit $eflags
    RET64 $rax
...
---
name:            cfcmov_no_convert
body:             |
  bb.0.entry:
    liveins: $eflags, $rax, $rbx
    ; CHECK: cfcmovew %bx, %ax, %ax                  # encoding: [0x62,0xf4,0x7d,0x1c,0x44,0xc3]
    ; CHECK: cfcmovsw 24(%rax), %bx, %bx             # encoding: [0x62,0xf4,0x65,0x1c,0x48,0x58,0x18]
    ; CHECK: cfcmovel %ebx, %eax, %eax               # encoding: [0x62,0xf4,0x7c,0x1c,0x44,0xc3]
    ; CHECK: cfcmovsl 24(%rax), %ebx, %ebx           # encoding: [0x62,0xf4,0x64,0x1c,0x48,0x58,0x18]
    ; CHECK: cfcmoveq %rbx, %rax, %rax               # encoding: [0x62,0xf4,0xfc,0x1c,0x44,0xc3]
    ; CHECK: cfcmovsq 24(%rax), %rbx, %rbx           # encoding: [0x62,0xf4,0xe4,0x1c,0x48,0x58,0x18]
    $ax = CFCMOV16rr_ND $ax, $bx, 4, implicit $eflags
    $bx = CFCMOV16rm_ND $bx, $rax, 1, $noreg, 24, $noreg, 8, implicit $eflags
    $eax = CFCMOV32rr_ND $eax, $ebx, 4, implicit $eflags
    $ebx = CFCMOV32rm_ND $ebx, $rax, 1, $noreg, 24, $noreg, 8, implicit $eflags
    $rax = CFCMOV64rr_ND $rax, $rbx, 4, implicit $eflags
    $rbx = CFCMOV64rm_ND $rbx, $rax, 1, $noreg, 24, $noreg, 8, implicit $eflags
    RET64 $rax
...
---
name:            no_convert_8bit_16bit
body:             |
  bb.0.entry:
    liveins: $di, $si, $ax
    ; CHECK: addb    %sil, %dil                      # EVEX TO LEGACY Compression encoding: [0x40,0x00,0xf7]
    ; CHECK: xorw    %di, %ax                        # EVEX TO LEGACY Compression encoding: [0x66,0x31,0xf8]
    $dil = ADD8rr_ND $dil, killed $sil, implicit-def dead $eflags
    $ax = XOR16rr_ND $ax, killed $di, implicit-def dead $eflags
    RET64 $rax
...