[PATCH] D94372: [X86][AMX] Prohibit pointer cast on load.

LuoYuanke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 10 05:44:00 PST 2021


LuoYuanke added inline comments.


================
Comment at: llvm/test/Transforms/InstCombine/load.ll:452
+entry:
+  %vec = load x86_amx, x86_amx* %src, align 64
+  %bc = bitcast x86_amx %vec to <256 x i32>
----------------
pengfei wrote:
> I think we had disabled the chance that `x86_amx*` been generated by compiler. It may mean somthing wrong if we see such load. So I think it's better just raise an assert fail for it here.
> Besides, it looks safe and better for performance to combine
> ```
> %vec = load x86_amx, x86_amx* %src, align 64
> %bc = bitcast x86_amx %vec to <256 x i32>
> ```
> to
> ```
> %bc = load <256 x i32>, <256 x i32>* %src, align 64
> ```
So we may delete this case, as we think "x86_amx*" is invalid. I can take x86_amx* as invalid in IR verification in another patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94372



More information about the llvm-commits mailing list