internal/opcodesextra: fix actions for VNNI and VBMI2 shifts (#372)

Fix the destination register actions for VNNI and VBMI2 concatenate and
variable shift instructions `VPSH{L,R}DV{W,D,Q}`. In the case of mask merging,
the action should be `RW` not `W`.

Prior to this change, the bug manifests as incorrect vector register
scheduling when `avo` doesn't recognize that these instructions have a data
dependency on the destination register.

See:
https://www.felixcloutier.com/x86/vpdpbusd
https://www.felixcloutier.com/x86/vpdpbusds
https://www.felixcloutier.com/x86/vpshldv
https://www.felixcloutier.com/x86/vpshrdv
This commit is contained in:
Vaughn Iverson
2023-03-06 22:52:03 -08:00
committed by GitHub
parent 577048e7d7
commit fc7bbb86e5
3 changed files with 342 additions and 342 deletions

View File

@@ -94,7 +94,7 @@ func _yvblendmpd(isa, bcst string) inst.Forms {
Operands: []inst.Operand{
{Type: "xmm", Action: inst.R},
{Type: "xmm", Action: inst.R},
{Type: "xmm{k}{z}", Action: inst.W},
{Type: "xmm{k}{z}", Action: inst.RW},
},
EncodingType: inst.EncodingTypeEVEX,
},
@@ -103,7 +103,7 @@ func _yvblendmpd(isa, bcst string) inst.Forms {
Operands: []inst.Operand{
{Type: "m128" + bcst, Action: inst.R},
{Type: "xmm", Action: inst.R},
{Type: "xmm{k}{z}", Action: inst.W},
{Type: "xmm{k}{z}", Action: inst.RW},
},
EncodingType: inst.EncodingTypeEVEX,
},
@@ -115,7 +115,7 @@ func _yvblendmpd(isa, bcst string) inst.Forms {
Operands: []inst.Operand{
{Type: "ymm", Action: inst.R},
{Type: "ymm", Action: inst.R},
{Type: "ymm{k}{z}", Action: inst.W},
{Type: "ymm{k}{z}", Action: inst.RW},
},
EncodingType: inst.EncodingTypeEVEX,
},
@@ -124,7 +124,7 @@ func _yvblendmpd(isa, bcst string) inst.Forms {
Operands: []inst.Operand{
{Type: "m256" + bcst, Action: inst.R},
{Type: "ymm", Action: inst.R},
{Type: "ymm{k}{z}", Action: inst.W},
{Type: "ymm{k}{z}", Action: inst.RW},
},
EncodingType: inst.EncodingTypeEVEX,
},
@@ -136,7 +136,7 @@ func _yvblendmpd(isa, bcst string) inst.Forms {
Operands: []inst.Operand{
{Type: "zmm", Action: inst.R},
{Type: "zmm", Action: inst.R},
{Type: "zmm{k}{z}", Action: inst.W},
{Type: "zmm{k}{z}", Action: inst.RW},
},
EncodingType: inst.EncodingTypeEVEX,
},
@@ -145,7 +145,7 @@ func _yvblendmpd(isa, bcst string) inst.Forms {
Operands: []inst.Operand{
{Type: "m512" + bcst, Action: inst.R},
{Type: "zmm", Action: inst.R},
{Type: "zmm{k}{z}", Action: inst.W},
{Type: "zmm{k}{z}", Action: inst.RW},
},
EncodingType: inst.EncodingTypeEVEX,
},