[PATCH] D98247: [X86][AMX] Prevent transforming load pointer from <256 x i32>* to x86_amx*.

Pengfei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 11 19:42:39 PST 2021


pengfei added a comment.

In D98247#2620989 <https://reviews.llvm.org/D98247#2620989>, @LuoYuanke wrote:

>> I don't know anything about the AMX type / functionality, so I'm probably not the best judge.
>> I agree that we want to avoid type-based hacks (but what does it mean that we even have target-specific types in IR?)...
>> OTOH there is already precedent for AMX exceptions in instcombine (and MMX before that). I think we managed to make some of the MMX hacks less obviously bad by excluding all target-specific types from a given transform. Is that a possibility here? That is, could we limit the transform using isIntOrIntVectorTy() or similar?
>
> Excluding all target-specific types from a given transform looks good to me. If we agree on this, I may refactor some of the code to exclude both MMX and AMX with a common type interface.

I don't think all target-specific types always have the same behavior. So a functionality repartition looks better to me. For example, under this AMX circumstance, the limitation is we are not preferring any pointer type been bitcasted to AMX* since it much more "expensive". So we may need an interface something like

  bool isTriviallyBitcastToPointer() const { return isX86_AMXTy(); }


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98247/new/

https://reviews.llvm.org/D98247



More information about the llvm-commits mailing list