[X86] Fix a bug when calculating the ldtilecfg insertion points.
authorWang, Pengfei <pengfei.wang@intel.com>
Sat, 20 Mar 2021 04:55:46 +0000 (12:55 +0800)
committerWang, Pengfei <pengfei.wang@intel.com>
Sat, 20 Mar 2021 09:48:59 +0000 (17:48 +0800)
commit2327513b853f030ff399413a651974ab23de4e1b
treede8ef1b192610c8c13e6aa9f53c7725ad604d466
parent5657f93e788f093c70fb448dd6f9398b149df278
[X86] Fix a bug when calculating the ldtilecfg insertion points.

The BB we initialized the ldtilecfg is special. We don't need to check
if its predecessor BBs need to insert ldtilecfg for calls.

We reused the flag HasCallBeforeAMX, so that the predecessors won't be
added to CfgNeedInsert.

This case happens only when the entry BB is in a loop. We need to hoist
the first tile config point out of the loop in future.

Reviewed By: LuoYuanke

Differential Revision: https://reviews.llvm.org/D98845
llvm/lib/Target/X86/X86PreTileConfig.cpp
llvm/test/CodeGen/X86/AMX/amx-across-func.ll