[X86PreAMXConfig] Use IRBuilder to insert instructions (NFC)
authorNikita Popov <npopov@redhat.com>
Wed, 22 Jun 2022 15:25:35 +0000 (17:25 +0200)
committerNikita Popov <npopov@redhat.com>
Wed, 22 Jun 2022 15:28:48 +0000 (17:28 +0200)
commit106151100867041f705a0cdf25dfe1f732b28443
tree593df5e37f004dbe6090921a9c6b25dfe7bb5bd8
parent65f44c9218e5e64ff1ca277b4f676f8415484d3f
[X86PreAMXConfig] Use IRBuilder to insert instructions (NFC)

Use an IRBuilder to insert instructions in preWriteTileCfg().
While here, also remove some unnecessary bool return values.

There are some test changes because the IRBuilder folds
"trunc i16 8 to i8" to "i8 8", and that has knock-on effects on
instruction naming.

I ran into this when converting tests to opaque pointers and
noticed that this pass introduces unnecessary "bitcast ptr to ptr"
instructions.
llvm/lib/Target/X86/X86PreAMXConfig.cpp
llvm/test/CodeGen/X86/AMX/amx-configO2toO0-precfg.ll