[all-commits] [llvm/llvm-project] 4e8f84: [X86][AVX512] Fold extract_element(bitcast(<X x i1...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sun Oct 23 06:48:37 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4e8f847676fd589c456abb266afe968c20fb63e3
      https://github.com/llvm/llvm-project/commit/4e8f847676fd589c456abb266afe968c20fb63e3
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-10-23 (Sun, 23 Oct 2022)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/bitcast-vector-bool.ll

  Log Message:
  -----------
  [X86][AVX512] Fold extract_element(bitcast(<X x i1>) -> bitcast(extract_subvector())

On AVX512, extract legal bool vectors as bool subvectors before bitcasting to scalars to avoid spilling to stack.

This helps rust which internally represents bool vectors as bool arrays

It also exposes more missed opportunities to use the KADD instruction to add masks together before moving to gpr

Fixes #58546




More information about the All-commits mailing list