[PATCH] D111249: [X86] Don't use popcnt for parity if only bits 7:0 of the input can be non-zero.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 6 10:42:22 PDT 2021
craig.topper created this revision.
craig.topper added reviewers: spatel, RKSimon.
Herald added subscribers: pengfei, hiraditya.
craig.topper requested review of this revision.
Herald added a project: LLVM.
Without popcnt we had a special case for using the parity flag from a single test i8 test instruction if only bits 7:0 could be non-zero. That special case is still useful when we have popcnt.
To reach this special case, we enable custom lowering of parity for i16/i32/i64 even when popcnt is enabled. The check for POPCNT being enabled is now after the special case in LowerPARITY.
Fixes PR52093
https://reviews.llvm.org/D111249
Files:
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/parity.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111249.377605.patch
Type: text/x-patch
Size: 9151 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211006/fa603f58/attachment.bin>
More information about the llvm-commits
mailing list