Lines Matching refs:smem
814 skip_smem_offset_align(opt_ctx& ctx, SMEM_instruction* smem) in skip_smem_offset_align() argument
816 bool soe = smem->operands.size() >= (!smem->definitions.empty() ? 3 : 4); in skip_smem_offset_align()
817 if (soe && !smem->operands[1].isConstant()) in skip_smem_offset_align()
823 Operand& op = smem->operands[soe ? smem->operands.size() - 1 : 1]; in skip_smem_offset_align()
844 skip_smem_offset_align(ctx, &instr->smem()); in smem_combine()
848 SMEM_instruction& smem = instr->smem(); in smem_combine() local
853 bool prevent_overflow = smem.operands[0].size() > 2 || smem.prevent_overflow; in smem_combine()
862 bool soe = smem.operands.size() >= (!smem.definitions.empty() ? 3 : 4); in smem_combine()
864 if (ctx.info[smem.operands.back().tempId()].is_constant_or_literal(32) && in smem_combine()
865 ctx.info[smem.operands.back().tempId()].val == 0) { in smem_combine()
866 smem.operands[1] = Operand::c32(offset); in smem_combine()
867 smem.operands.back() = Operand(base); in smem_combine()
871 smem.opcode, Format::SMEM, smem.operands.size() + 1, smem.definitions.size()); in smem_combine()
872 new_instr->operands[0] = smem.operands[0]; in smem_combine()
874 if (smem.definitions.empty()) in smem_combine()
875 new_instr->operands[2] = smem.operands[2]; in smem_combine()
877 if (!smem.definitions.empty()) in smem_combine()
878 new_instr->definitions[0] = smem.definitions[0]; in smem_combine()
879 new_instr->sync = smem.sync; in smem_combine()
880 new_instr->glc = smem.glc; in smem_combine()
881 new_instr->dlc = smem.dlc; in smem_combine()
882 new_instr->nv = smem.nv; in smem_combine()
883 new_instr->disable_wqm = smem.disable_wqm; in smem_combine()
891 skip_smem_offset_align(ctx, &instr->smem()); in smem_combine()