Commit c5e321d
[X86] Correct the cdisp8 encoding for VSCATTER/VGATHER prefetch (llvm#122051)
during differential fuzzing, I found 8 more instructions with disp8
offset multiplier differences to binutils. somewhat sure there is a bug
in the X86 LLVM disp8 offset multipliers for this subset of vector
scatter and gather prefetch instructions. please check and refer to the
previous pull request: llvm#120340
these vector scatter and gather prefetch instructions also have an
unusual k mask operand position but I have not addressed this with this
patch as I am unsure how to change the Intel format in the tablegen
file.
```
hex: 62 f2 fd 49 c6 4c 51 01
llvm: vgatherpf0dpd {k1}, zmmword ptr [rcx + 2*ymm2 + 4]
ours: vgatherpf0dpd qword ptr * 8 [rcx + 2*ymm2 + 8] {k1}
gnu: vgatherpf0dpd QWORD PTR [rcx+ymm2*2+0x8]{k1}
hex: 62 f2 7d 49 c7 4c 51 01
llvm: vgatherpf0qps {k1}, ymmword ptr [rcx + 2*zmm2 + 8]
ours: vgatherpf0qps dword ptr * 8 [rcx + 2*zmm2 + 4] {k1}
gnu: vgatherpf0qps DWORD PTR [rcx+zmm2*2+0x4]{k1}
hex: 62 f2 fd 49 c6 54 51 01
llvm: vgatherpf1dpd {k1}, zmmword ptr [rcx + 2*ymm2 + 4]
ours: vgatherpf1dpd qword ptr * 8 [rcx + 2*ymm2 + 8] {k1}
gnu: vgatherpf1dpd QWORD PTR [rcx+ymm2*2+0x8]{k1}
hex: 62 f2 7d 49 c7 54 51 01
llvm: vgatherpf1qps {k1}, ymmword ptr [rcx + 2*zmm2 + 8]
ours: vgatherpf1qps dword ptr * 8 [rcx + 2*zmm2 + 4] {k1}
gnu: vgatherpf1qps DWORD PTR [rcx+zmm2*2+0x4]{k1}
hex: 62 f2 fd 49 c6 6c 51 01
llvm: vscatterpf0dpd {k1}, zmmword ptr [rcx + 2*ymm2 + 4]
ours: vscatterpf0dpd qword ptr * 8 [rcx + 2*ymm2 + 8] {k1}
gnu: vscatterpf0dpd QWORD PTR [rcx+ymm2*2+0x8]{k1}
hex: 62 f2 7d 49 c7 6c 51 01
llvm: vscatterpf0qps {k1}, ymmword ptr [rcx + 2*zmm2 + 8]
ours: vscatterpf0qps dword ptr * 8 [rcx + 2*zmm2 + 4] {k1}
gnu: vscatterpf0qps DWORD PTR [rcx+zmm2*2+0x4]{k1}
hex: 62 f2 fd 49 c6 74 51 01
llvm: vscatterpf1dpd {k1}, zmmword ptr [rcx + 2*ymm2 + 4]
ours: vscatterpf1dpd qword ptr * 8 [rcx + 2*ymm2 + 8] {k1}
gnu: vscatterpf1dpd QWORD PTR [rcx+ymm2*2+0x8]{k1}
hex: 62 f2 7d 49 c7 74 51 01
llvm: vscatterpf1qps {k1}, ymmword ptr [rcx + 2*zmm2 + 8]
ours: vscatterpf1qps dword ptr * 8 [rcx + 2*zmm2 + 4] {k1}
gnu: vscatterpf1qps DWORD PTR [rcx+zmm2*2+0x4]{k1}
```1 parent 747e639 commit c5e321d
File tree
2 files changed
+72
-8
lines changed- llvm
- lib/Target/X86
- test/MC/X86
2 files changed
+72
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10388 | 10388 | | |
10389 | 10389 | | |
10390 | 10390 | | |
10391 | | - | |
| 10391 | + | |
10392 | 10392 | | |
10393 | 10393 | | |
10394 | | - | |
| 10394 | + | |
10395 | 10395 | | |
10396 | 10396 | | |
10397 | 10397 | | |
| |||
10400 | 10400 | | |
10401 | 10401 | | |
10402 | 10402 | | |
10403 | | - | |
| 10403 | + | |
10404 | 10404 | | |
10405 | 10405 | | |
10406 | | - | |
| 10406 | + | |
10407 | 10407 | | |
10408 | 10408 | | |
10409 | 10409 | | |
| |||
10412 | 10412 | | |
10413 | 10413 | | |
10414 | 10414 | | |
10415 | | - | |
| 10415 | + | |
10416 | 10416 | | |
10417 | 10417 | | |
10418 | | - | |
| 10418 | + | |
10419 | 10419 | | |
10420 | 10420 | | |
10421 | 10421 | | |
| |||
10424 | 10424 | | |
10425 | 10425 | | |
10426 | 10426 | | |
10427 | | - | |
| 10427 | + | |
10428 | 10428 | | |
10429 | 10429 | | |
10430 | | - | |
| 10430 | + | |
10431 | 10431 | | |
10432 | 10432 | | |
10433 | 10433 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 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 | + | |
0 commit comments