SuccessChanges

Summary

  1. [X86] Add test cases for missed opportunity to use a byte test instruction instead of an xor with 0 in parity patterns. (details)
  2. [X86] Use parity flag from byte test/cmp instruction for __builtin_parity when input fits in 8 bits. (details)
Commit a258338d627170f204c40ebe93ea7fb18c7c1197 by craig.topper
[X86] Add test cases for missed opportunity to use a byte test instruction instead of an xor with 0 in parity patterns.

If the input to the ctpop fits in 8 bits, we can use the parity
flag from a TEST instruction, but we're currently XORing with 0.
The file was modifiedllvm/test/CodeGen/X86/parity.ll
Commit 64516ec7c1298a4cb16980db49c2f9466f0f3ab5 by craig.topper
[X86] Use parity flag from byte test/cmp instruction for __builtin_parity when input fits in 8 bits.

If the upper bits of the __builtin_parity idiom are known to be
0 we were previously emitting an xor with 0 to get the parity flag.
But we can use cmp/test instead which may expose opportunities for
load folding or combining an AND.
The file was modifiedllvm/test/CodeGen/X86/vector-reduce-xor-bool.ll
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/parity.ll