As the patch https://reviews.llvm.org/D135202 introduces the target extension type, we can represent higher level or complex type as single value types which are valid in target specific registers from CodeGen’s perspective in LLVM IR. So we can remove some target specific type already in LLVM IR such as x86amx and represent them by target extension type consistently.
This patch removes X86AMX type in LLVM IR and replace it with target extension called target("X86.AMX"). It also does not change anything in backend and only add two bitcast intrinsics to express bitcast between <256 x i32> and target("X86.AMX") because bitcast inst is not allowed for target extension in LLVM IR. It needs to try to remove bitcast intrinsics in next follow-up patch, which I think there are more important work in clang about how to support target extension type instead of using V256Ii type flags in builtin parameters.
Probably worthwhile to add an overload like Type::isTargetExtTy(StringRef)?