Index: llvm/trunk/lib/Target/AMDGPU/DSInstructions.td =================================================================== --- llvm/trunk/lib/Target/AMDGPU/DSInstructions.td +++ llvm/trunk/lib/Target/AMDGPU/DSInstructions.td @@ -600,8 +600,6 @@ (inst $ptr, (as_i16imm $offset), (i1 0)) >; -// FIXME: Passing name of PatFrag in workaround. Why doesn't -// !cast(frag.NAME#"_m0") work!? multiclass DSReadPat_mc { let OtherPredicates = [LDSRequiresM0Init] in { @@ -609,7 +607,7 @@ } let OtherPredicates = [NotLDSRequiresM0Init] in { - def : DSReadPat(inst.NAME#"_gfx9"), vt, !cast(frag)>; + def : DSReadPat(!cast(inst)#"_gfx9"), vt, !cast(frag)>; } } @@ -678,7 +676,7 @@ } let OtherPredicates = [NotLDSRequiresM0Init] in { - def : DSWritePat(inst.NAME#"_gfx9"), vt, !cast(frag)>; + def : DSWritePat(!cast(inst)#"_gfx9"), vt, !cast(frag)>; } } @@ -732,7 +730,8 @@ } let OtherPredicates = [NotLDSRequiresM0Init] in { - def : DSAtomicRetPat(inst.NAME#"_gfx9"), vt, !cast(frag)>; + def : DSAtomicRetPat(!cast(inst)#"_gfx9"), vt, + !cast(frag)>; } } @@ -749,7 +748,8 @@ } let OtherPredicates = [NotLDSRequiresM0Init] in { - def : DSAtomicCmpXChg(inst.NAME#"_gfx9"), vt, !cast(frag)>; + def : DSAtomicCmpXChg(!cast(inst)#"_gfx9"), vt, + !cast(frag)>; } }