[all-commits] [llvm/llvm-project] ac82b9: [X86] Use h-register for final XOR of __builtin_pa...

topperc via All-commits all-commits at lists.llvm.org
Mon Aug 3 10:10:45 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ac82b918c74f3fab8d4a7c1905277bda6b9bccb4
      https://github.com/llvm/llvm-project/commit/ac82b918c74f3fab8d4a7c1905277bda6b9bccb4
  Author: Craig Topper <craig.topper at intel.com>
  Date:   2020-08-03 (Mon, 03 Aug 2020)

  Changed paths:
    M llvm/lib/Target/X86/X86InstrArithmetic.td
    M llvm/lib/Target/X86/X86InstrCompiler.td
    M llvm/test/CodeGen/X86/parity.ll
    M llvm/test/CodeGen/X86/vector-reduce-xor-bool.ll

  Log Message:
  -----------
  [X86] Use h-register for final XOR of __builtin_parity on 64-bit targets.

This adds an isel pattern and special XOR8rr_NOREX instruction
to enable the use of h-registers for __builtin_parity. This avoids
a copy and a shift instruction. The NOREX instruction is in case
register allocation doesn't use the matching l-register for some
reason. If a R8-R15 register gets picked instead, we won't be
able to encode the instruction since an h-register can't be used
with a REX prefix.

Fixes PR46954




More information about the All-commits mailing list