[all-commits] [llvm/llvm-project] 58b68e: [X86] Don't use popcnt for parity if only bits 7:0...
Craig Topper via All-commits
all-commits at lists.llvm.org
Wed Oct 6 14:41:11 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 58b68e70ebf6308f982426a2618782f473218eed
https://github.com/llvm/llvm-project/commit/58b68e70ebf6308f982426a2618782f473218eed
Author: Craig Topper <craig.topper at sifive.com>
Date: 2021-10-06 (Wed, 06 Oct 2021)
Changed paths:
M llvm/lib/Target/X86/X86ISelLowering.cpp
M llvm/test/CodeGen/X86/parity.ll
Log Message:
-----------
[X86] Don't use popcnt for parity if only bits 7:0 of the input can be non-zero.
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
Differential Revision: https://reviews.llvm.org/D111249
More information about the All-commits
mailing list