@@ -2431,10 +2431,10 @@ class VBUFFER_MTBUF_Real_gfx12<bits<4> op, MTBUF_Pseudo ps,
24312431// MUBUF - GFX11, GFX12.
24322432//===----------------------------------------------------------------------===//
24332433
2434- // Shortcut to default Mnemonic from MUBUF_Pseudo . Hides the cast to the
2434+ // Shortcut to default Mnemonic from BUF_Pseudo . Hides the cast to the
24352435// specific pseudo (bothen in this case) since any of them will work.
2436- class get_MUBUF_ps <string name> {
2437- string Mnemonic = !cast<MUBUF_Pseudo >(name # "_BOTHEN").Mnemonic;
2436+ class get_BUF_ps <string name> {
2437+ string Mnemonic = !cast<BUF_Pseudo >(name # "_BOTHEN").Mnemonic;
24382438}
24392439
24402440// gfx11 instruction that accept both old and new assembler name.
@@ -2487,14 +2487,14 @@ multiclass MUBUF_Real_AllAddr_gfx11_gfx12_Renamed_Impl<bits<8> op, string real_n
24872487
24882488// Non-renamed, non-atomic gfx11/gfx12 mubuf instructions.
24892489multiclass MUBUF_Real_AllAddr_gfx11<bits<8> op, bit hasTFE = 1> :
2490- MUBUF_Real_AllAddr_gfx11_Renamed_Impl<op, get_MUBUF_ps <NAME>.Mnemonic, hasTFE>;
2490+ MUBUF_Real_AllAddr_gfx11_Renamed_Impl<op, get_BUF_ps <NAME>.Mnemonic, hasTFE>;
24912491
24922492multiclass MUBUF_Real_AllAddr_gfx11_gfx12<bits<8> op, bit hasTFE = 1> :
2493- MUBUF_Real_AllAddr_gfx11_gfx12_Renamed_Impl<op, get_MUBUF_ps <NAME>.Mnemonic, hasTFE>;
2493+ MUBUF_Real_AllAddr_gfx11_gfx12_Renamed_Impl<op, get_BUF_ps <NAME>.Mnemonic, hasTFE>;
24942494
24952495multiclass MUBUF_Real_AllAddr_gfx11_gfx12_Renamed<bits<8> op, string real_name> :
24962496 MUBUF_Real_AllAddr_gfx11_gfx12_Renamed_Impl<op, real_name> {
2497- def : Mnem_gfx11_gfx12<get_MUBUF_ps <NAME>.Mnemonic, real_name>;
2497+ def : Mnem_gfx11_gfx12<get_BUF_ps <NAME>.Mnemonic, real_name>;
24982498}
24992499
25002500class MUBUF_Real_Atomic_gfx11_impl<bits<8> op, string ps_name,
@@ -2538,32 +2538,32 @@ multiclass MUBUF_Real_Atomic_gfx11_gfx12_Renamed_impl<bits<8> op, bit is_return,
25382538
25392539// Non-renamed gfx11/gfx12 mubuf atomic.
25402540multiclass MUBUF_Real_Atomic_gfx11_gfx12<bits<8> op> :
2541- MUBUF_Real_Atomic_gfx11_gfx12_Renamed_impl<op, 0, get_MUBUF_ps <NAME>.Mnemonic>,
2542- MUBUF_Real_Atomic_gfx11_gfx12_Renamed_impl<op, 1, get_MUBUF_ps <NAME>.Mnemonic>;
2541+ MUBUF_Real_Atomic_gfx11_gfx12_Renamed_impl<op, 0, get_BUF_ps <NAME>.Mnemonic>,
2542+ MUBUF_Real_Atomic_gfx11_gfx12_Renamed_impl<op, 1, get_BUF_ps <NAME>.Mnemonic>;
25432543
25442544multiclass MUBUF_Real_Atomic_gfx12<bits<8> op> :
2545- MUBUF_Real_Atomic_gfx12_Renamed_impl<op, 0, get_MUBUF_ps <NAME>.Mnemonic>,
2546- MUBUF_Real_Atomic_gfx12_Renamed_impl<op, 1, get_MUBUF_ps <NAME>.Mnemonic>;
2545+ MUBUF_Real_Atomic_gfx12_Renamed_impl<op, 0, get_BUF_ps <NAME>.Mnemonic>,
2546+ MUBUF_Real_Atomic_gfx12_Renamed_impl<op, 1, get_BUF_ps <NAME>.Mnemonic>;
25472547
25482548multiclass MUBUF_Real_Atomic_gfx11_Renamed<bits<8> op, string real_name> :
25492549 MUBUF_Real_Atomic_gfx11_Renamed_impl<op, 0, real_name>,
25502550 MUBUF_Real_Atomic_gfx11_Renamed_impl<op, 1, real_name> {
2551- def : Mnem_gfx11_gfx12<get_MUBUF_ps <NAME>.Mnemonic, real_name>;
2551+ def : Mnem_gfx11_gfx12<get_BUF_ps <NAME>.Mnemonic, real_name>;
25522552}
25532553
25542554multiclass MUBUF_Real_Atomic_gfx11_gfx12_Renamed<bits<8> op, string real_name> :
25552555 MUBUF_Real_Atomic_gfx11_gfx12_Renamed_impl<op, 0, real_name>,
25562556 MUBUF_Real_Atomic_gfx11_gfx12_Renamed_impl<op, 1, real_name> {
2557- def : Mnem_gfx11_gfx12<get_MUBUF_ps <NAME>.Mnemonic, real_name>;
2557+ def : Mnem_gfx11_gfx12<get_BUF_ps <NAME>.Mnemonic, real_name>;
25582558}
25592559
25602560multiclass MUBUF_Real_Atomic_gfx11_gfx12_Renamed_gfx12_Renamed<bits<8> op, string gfx12_name, string gfx11_name> :
25612561 MUBUF_Real_Atomic_gfx11_Renamed_impl<op, 0, gfx11_name>,
25622562 MUBUF_Real_Atomic_gfx11_Renamed_impl<op, 1, gfx11_name>,
25632563 MUBUF_Real_Atomic_gfx12_Renamed_impl<op, 0, gfx12_name>,
25642564 MUBUF_Real_Atomic_gfx12_Renamed_impl<op, 1, gfx12_name> {
2565- def : Mnem_gfx11<get_MUBUF_ps <NAME>.Mnemonic, gfx11_name>;
2566- def : Mnem_gfx12<get_MUBUF_ps <NAME>.Mnemonic, gfx12_name>;
2565+ def : Mnem_gfx11<get_BUF_ps <NAME>.Mnemonic, gfx11_name>;
2566+ def : Mnem_gfx12<get_BUF_ps <NAME>.Mnemonic, gfx12_name>;
25672567 def : Mnem_gfx12<gfx11_name, gfx12_name>;
25682568}
25692569
@@ -2944,17 +2944,14 @@ multiclass MTBUF_Real_AllAddr_gfx11_gfx12_Renamed_Impl<bits<4> op, string real_n
29442944 VBUFFER_MTBUF_Real_gfx12<op, !cast<MTBUF_Pseudo>(NAME#"_VBUFFER_OFFSET"), real_name>;
29452945}
29462946
2947- multiclass MTBUF_Real_AllAddr_gfx11_gfx12_Impl<bits<4> op, MTBUF_Pseudo ps>
2948- : MTBUF_Real_AllAddr_gfx11_gfx12_Renamed_Impl<op, ps.Mnemonic>;
29492947multiclass MTBUF_Real_AllAddr_gfx11_gfx12<bits<4> op>
2950- : MTBUF_Real_AllAddr_gfx11_gfx12_Impl <op, !cast<MTBUF_Pseudo>( NAME#"_BOTHEN") >;
2948+ : MTBUF_Real_AllAddr_gfx11_gfx12_Renamed_Impl <op, get_BUF_ps< NAME>.Mnemonic >;
29512949
29522950
2953- class Pre_gfx11_MTBUF_Name <MTBUF_Pseudo ps, string real_name>
2954- : MnemonicAlias<ps.Mnemonic, real_name>, Requires<[isGFX11Plus]>;
29552951multiclass MTBUF_Real_AllAddr_gfx11_gfx12_Renamed<bits<4> op, string real_name>
29562952 : MTBUF_Real_AllAddr_gfx11_gfx12_Renamed_Impl<op, real_name> {
2957- def : Pre_gfx11_MTBUF_Name<!cast<MTBUF_Pseudo>(NAME#"_BOTHEN"), real_name>;
2953+ defvar ps = get_BUF_ps<NAME>;
2954+ def : MnemonicAlias<ps.Mnemonic, real_name>, Requires<[isGFX11Plus]>;
29582955}
29592956
29602957defm TBUFFER_LOAD_FORMAT_D16_X : MTBUF_Real_AllAddr_gfx11_gfx12_Renamed<0x008, "tbuffer_load_d16_format_x">;
0 commit comments