[PATCH] D99256: [X86][AVX] splitIntVSETCC - handle separate (canonicalized) SETCC operands

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 24 05:31:37 PDT 2021


RKSimon created this revision.
RKSimon added reviewers: spatel, lebedev.ri, pengfei, craig.topper.
Herald added a subscriber: hiraditya.
RKSimon requested review of this revision.
Herald added a project: LLVM.

LowerVSETCC calls splitIntVSETCC after canonicalizing certain patterns, in particular (X & CPow2 != 0) -> (X & CPow2 == CPow2).

Unfortunately if we're splitting for AVX1/non-AVX512BW cases, we lose these canonicalizations as we call the split with the original SetCC node, and when the split nodes are later lowered in LowerVSETCC the patterns are lost behind extract_subvector etc. But if we pass the canonicalized operands for splitting we retain the optimizations.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D99256

Files:
  llvm/lib/Target/X86/X86ISelLowering.cpp
  llvm/test/CodeGen/X86/bitcast-int-to-vector-bool-sext.ll
  llvm/test/CodeGen/X86/bitcast-int-to-vector-bool-zext.ll
  llvm/test/CodeGen/X86/bitcast-int-to-vector-bool.ll
  llvm/test/CodeGen/X86/vector-sext.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99256.332945.patch
Type: text/x-patch
Size: 25155 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210324/36fa64ae/attachment.bin>


More information about the llvm-commits mailing list