[all-commits] [llvm/llvm-project] 239ab1: [X86] combineCMP - attempt to simplify KSHIFTR mas...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Thu Aug 31 05:14:26 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 239ab16ec1213749a2228368298519b377d336bb
      https://github.com/llvm/llvm-project/commit/239ab16ec1213749a2228368298519b377d336bb
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2023-08-31 (Thu, 31 Aug 2023)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/avx512-insert-extract.ll
    M llvm/test/CodeGen/X86/movmsk-cmp.ll
    M llvm/test/CodeGen/X86/pr33349.ll
    M llvm/test/CodeGen/X86/pr34177.ll

  Log Message:
  -----------
  [X86] combineCMP - attempt to simplify KSHIFTR mask element extractions when just comparing against zero

We can just bitcast the pre-shifted mask as an integer and use TEST/BT directly.

This can be extended further to better handle sub-i8 mask cases, but just getting rid of KSHIFTR nodes makes a notable difference.




More information about the All-commits mailing list