Skip to content

Commit 375d192

Browse files
Revert "[NVPTX] Emit prmt selection value in hex" (#115204)
Reverts #115049
1 parent ccf5d62 commit 375d192

File tree

6 files changed

+90
-111
lines changed

6 files changed

+90
-111
lines changed

llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXInstPrinter.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -373,12 +373,6 @@ void NVPTXInstPrinter::printOffseti32imm(const MCInst *MI, int OpNum,
373373
}
374374
}
375375

376-
void NVPTXInstPrinter::printHexu32imm(const MCInst *MI, int OpNum,
377-
raw_ostream &O, const char *Modifier) {
378-
int64_t Imm = MI->getOperand(OpNum).getImm();
379-
O << formatHex(Imm) << "U";
380-
}
381-
382376
void NVPTXInstPrinter::printProtoIdent(const MCInst *MI, int OpNum,
383377
raw_ostream &O, const char *Modifier) {
384378
const MCOperand &Op = MI->getOperand(OpNum);

llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXInstPrinter.h

-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ class NVPTXInstPrinter : public MCInstPrinter {
4848
raw_ostream &O, const char *Modifier = nullptr);
4949
void printOffseti32imm(const MCInst *MI, int OpNum, raw_ostream &O,
5050
const char *Modifier = nullptr);
51-
void printHexu32imm(const MCInst *MI, int OpNum, raw_ostream &O,
52-
const char *Modifier = nullptr);
5351
void printProtoIdent(const MCInst *MI, int OpNum,
5452
raw_ostream &O, const char *Modifier = nullptr);
5553
void printPrmtMode(const MCInst *MI, int OpNum, raw_ostream &O,

llvm/lib/Target/NVPTX/NVPTXInstrInfo.td

+2-6
Original file line numberDiff line numberDiff line change
@@ -1740,10 +1740,6 @@ multiclass BFI<string Instr, ValueType T, RegisterClass RC, Operand ImmCls> {
17401740
[(set (T RC:$f), (bfi (T imm:$a), (T RC:$b), (i32 imm:$c), (i32 imm:$d)))]>;
17411741
}
17421742

1743-
def Hexu32imm : Operand<i32> {
1744-
let PrintMethod = "printHexu32imm";
1745-
}
1746-
17471743
multiclass PRMT<ValueType T, RegisterClass RC> {
17481744
def rrr
17491745
: NVPTXInst<(outs RC:$d),
@@ -1752,12 +1748,12 @@ multiclass PRMT<ValueType T, RegisterClass RC> {
17521748
[(set (T RC:$d), (prmt (T RC:$a), (T RC:$b), (i32 Int32Regs:$c), imm:$mode))]>;
17531749
def rri
17541750
: NVPTXInst<(outs RC:$d),
1755-
(ins RC:$a, Int32Regs:$b, Hexu32imm:$c, PrmtMode:$mode),
1751+
(ins RC:$a, Int32Regs:$b, i32imm:$c, PrmtMode:$mode),
17561752
!strconcat("prmt.b32${mode}", " \t$d, $a, $b, $c;"),
17571753
[(set (T RC:$d), (prmt (T RC:$a), (T RC:$b), (i32 imm:$c), imm:$mode))]>;
17581754
def rii
17591755
: NVPTXInst<(outs RC:$d),
1760-
(ins RC:$a, i32imm:$b, Hexu32imm:$c, PrmtMode:$mode),
1756+
(ins RC:$a, i32imm:$b, i32imm:$c, PrmtMode:$mode),
17611757
!strconcat("prmt.b32${mode}", " \t$d, $a, $b, $c;"),
17621758
[(set (T RC:$d), (prmt (T RC:$a), (T imm:$b), (i32 imm:$c), imm:$mode))]>;
17631759
}

0 commit comments

Comments
 (0)