Skip to content

Commit b3f5c72

Browse files
authored
AMDGPU: Assume true in getVOPNIsSingle helpers (#98516)
If we have something we don't know what it is, we should conservatively avoid printing an additional suffix. For isCodeGenOnly pseudoinstructions, no encoded instruction is added to the tables this is queried, and the null case would assume true. This happens to fix the case I ran into, but this isn't a wholistic fix. These really should be encoded directly in the TSFlags of the MCInstrDesc, which would allow encoding pseudos to work correctly.
1 parent 58bc98c commit b3f5c72

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -496,17 +496,17 @@ bool getSMEMIsBuffer(unsigned Opc) {
496496

497497
bool getVOP1IsSingle(unsigned Opc) {
498498
const VOPInfo *Info = getVOP1OpcodeHelper(Opc);
499-
return Info ? Info->IsSingle : false;
499+
return Info ? Info->IsSingle : true;
500500
}
501501

502502
bool getVOP2IsSingle(unsigned Opc) {
503503
const VOPInfo *Info = getVOP2OpcodeHelper(Opc);
504-
return Info ? Info->IsSingle : false;
504+
return Info ? Info->IsSingle : true;
505505
}
506506

507507
bool getVOP3IsSingle(unsigned Opc) {
508508
const VOPInfo *Info = getVOP3OpcodeHelper(Opc);
509-
return Info ? Info->IsSingle : false;
509+
return Info ? Info->IsSingle : true;
510510
}
511511

512512
bool isVOPC64DPP(unsigned Opc) {

0 commit comments

Comments
 (0)