[all-commits] [llvm/llvm-project] aa02b7: [X86] Let's improve the expression we dump for vpt...
David Majnemer via All-commits
all-commits at lists.llvm.org
Tue Oct 1 14:19:26 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: aa02b76b1a4c2df1a701fbd8a8378d1cd946e70a
https://github.com/llvm/llvm-project/commit/aa02b76b1a4c2df1a701fbd8a8378d1cd946e70a
Author: David Majnemer <david.majnemer at gmail.com>
Date: 2024-10-01 (Tue, 01 Oct 2024)
Changed paths:
M llvm/lib/Target/X86/MCTargetDesc/X86InstComments.cpp
M llvm/test/CodeGen/X86/avx512-gfni-intrinsics.ll
M llvm/test/CodeGen/X86/avx512-intrinsics-upgrade.ll
M llvm/test/CodeGen/X86/avx512vl-intrinsics-upgrade.ll
M llvm/test/CodeGen/X86/avx512vl-intrinsics.ll
M llvm/test/CodeGen/X86/sse-intrinsics-fast-isel.ll
M llvm/test/CodeGen/X86/sse2-intrinsics-fast-isel.ll
M llvm/test/CodeGen/X86/stack-folding-int-avx512.ll
M llvm/test/CodeGen/X86/vector-interleaved-load-i16-stride-5.ll
M llvm/test/CodeGen/X86/vector-interleaved-load-i16-stride-6.ll
M llvm/test/CodeGen/X86/vector-interleaved-load-i16-stride-7.ll
M llvm/test/CodeGen/X86/vector-interleaved-load-i8-stride-6.ll
M llvm/test/CodeGen/X86/vector-interleaved-store-i16-stride-5.ll
M llvm/test/CodeGen/X86/vector-interleaved-store-i16-stride-6.ll
M llvm/test/CodeGen/X86/vector-interleaved-store-i16-stride-7.ll
M llvm/test/CodeGen/X86/vector-interleaved-store-i8-stride-8.ll
Log Message:
-----------
[X86] Let's improve the expression we dump for vpternlog
Right now, we are printing stuff like:
zmm0 = (~zmm0 & zmm1 & mem) | (zmm0 & ~zmm1 & ~mem) |
(zmm0 & ~zmm1 & mem) | (zmm0 & zmm1 & ~mem) |
(zmm0 & zmm1 & mem)
This is not wrong but it sure is verbose and it makes it a bit hard to
understand what is going on at a glance.
The above expression is equivalent to:
zmm0 = zmm0 | (zmm1 & mem)
I considered simplifying the expressions on the fly but that gets out of
hand very quickly. Quine-McCluskey is not so simple and so fast that it
makes a ton of sense for our pretty printer. I quickly played around
with some different normal forms and ended up just using this [1] table
of functions with some minor post-processing. I made sure that each
function is identical to the appropriate BooleanFunction in Mathematica.
If the size of these tables ends up mattering for whatever reason there
are a few obvious things we could do to save space without undue effort.
[1]: https://gist.github.com/dougallj/81a80cd381988466c4e1c4889ecac95b#file-2-x86-base-txt
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list