@@ -421,15 +421,15 @@ struct RawBufferOpLowering : public ConvertOpToLLVMPattern<GpuOp> {
421421
422422// TODO: AMDGPU backend already have all this bitpacking logic, we should move
423423// it to some common place.
424- // / \details \p Vmcnt, \p Expcnt and \p Lgkmcnt are decoded as follows:
425- // / \p Vmcnt = \p Waitcnt[3:0] (pre-gfx9)
426- // / \p Vmcnt = \p Waitcnt[15:14,3:0] (gfx9,10)
427- // / \p Vmcnt = \p Waitcnt[15:10] (gfx11)
428- // / \p Expcnt = \p Waitcnt[6:4] (pre-gfx11)
429- // / \p Expcnt = \p Waitcnt[2:0] (gfx11)
430- // / \p Lgkmcnt = \p Waitcnt[11:8] (pre-gfx10)
431- // / \p Lgkmcnt = \p Waitcnt[13:8] (gfx10)
432- // / \p Lgkmcnt = \p Waitcnt[9:4] (gfx11)
424+ // / Vmcnt, Expcnt and Lgkmcnt are decoded as follows:
425+ // / Vmcnt = Waitcnt[3:0] (pre-gfx9)
426+ // / Vmcnt = Waitcnt[15:14,3:0] (gfx9,10)
427+ // / Vmcnt = Waitcnt[15:10] (gfx11)
428+ // / Expcnt = Waitcnt[6:4] (pre-gfx11)
429+ // / Expcnt = Waitcnt[2:0] (gfx11)
430+ // / Lgkmcnt = Waitcnt[11:8] (pre-gfx10)
431+ // / Lgkmcnt = Waitcnt[13:8] (gfx10)
432+ // / Lgkmcnt = Waitcnt[9:4] (gfx11)
433433static FailureOr<unsigned > encodeWaitcnt (Chipset chipset, unsigned vmcnt,
434434 unsigned expcnt, unsigned lgkmcnt) {
435435 if (chipset.majorVersion < 9 ) {
@@ -479,16 +479,16 @@ struct MemoryCounterWaitOpLowering
479479 ConversionPatternRewriter &rewriter) const override {
480480 if (chipset.majorVersion >= 12 ) {
481481 Location loc = op.getLoc ();
482- if (auto ds = adaptor.getDs ())
482+ if (std::optional< int > ds = adaptor.getDs ())
483483 rewriter.create <ROCDL::WaitDscntOp>(loc, *ds);
484484
485- if (auto load = adaptor.getLoad ())
485+ if (std::optional< int > load = adaptor.getLoad ())
486486 rewriter.create <ROCDL::WaitLoadcntOp>(loc, *load);
487487
488- if (auto store = adaptor.getStore ())
488+ if (std::optional< int > store = adaptor.getStore ())
489489 rewriter.create <ROCDL::WaitStorecntOp>(loc, *store);
490490
491- if (auto exp = adaptor.getExp ())
491+ if (std::optional< int > exp = adaptor.getExp ())
492492 rewriter.create <ROCDL::WaitExpcntOp>(loc, *exp);
493493
494494 rewriter.eraseOp (op);
0 commit comments