// RUN: llvm-mc -arch=amdgcn -mcpu=fiji %s | FileCheck %s --check-prefix=VI
//===----------------------------------------------------------------------===//
// Example of reg and reg syntax in macros.
//===----------------------------------------------------------------------===//
.macro REG_NUM_EXPR_EXAMPLE width iter iter_end
.if \width == 4
flat_load_dwordx4 v , v
.else
flat_load_dword v , v
.endif
REG_NUM_EXPR_EXAMPLE \width, (\iter + 1), \iter_end
.endif
.endm
REG_NUM_EXPR_EXAMPLE 4, 0, 0
// VI: flat_load_dwordx4 v , v
REG_NUM_EXPR_EXAMPLE 1, 0, 0
// VI: flat_load_dword v8, v
REG_NUM_EXPR_EXAMPLE 4, 1, 4
// VI: flat_load_dwordx4 v , v
// VI: flat_load_dwordx4 v , v
// VI: flat_load_dwordx4 v , v
// VI: flat_load_dwordx4 v , v
REG_NUM_EXPR_EXAMPLE 1, 1, 4
// VI: flat_load_dword v9, v
// VI: flat_load_dword v10, v
// VI: flat_load_dword v11, v
// VI: flat_load_dword v12, v