[PATCH] D151535: [X86] fold select to mask instructions.

LuoYuanke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 25 22:35:34 PDT 2023


LuoYuanke created this revision.
Herald added subscribers: pengfei, hiraditya.
Herald added a project: All.
LuoYuanke requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

When avx512 is available the lhs operand of select instruction can be
folded with mask instruction, while the rhs operand can't. This patch is
to commute the lhs and rhs of the select instruction to create the
opportunity of folding.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D151535

Files:
  llvm/lib/Target/X86/X86ISelLowering.cpp
  llvm/test/CodeGen/X86/avx512f-vec-test-testn.ll
  llvm/test/CodeGen/X86/combine-rotates.ll
  llvm/test/CodeGen/X86/paddus.ll
  llvm/test/CodeGen/X86/sat-add.ll
  llvm/test/CodeGen/X86/vector-bo-select-avx512.ll
  llvm/test/CodeGen/X86/vector-bo-select.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151535.525944.patch
Type: text/x-patch
Size: 19714 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230526/5fac5aaf/attachment.bin>


More information about the llvm-commits mailing list