[PATCH] D103280: [SDAG] try harder to fold casts into vector compare

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 27 12:58:42 PDT 2021


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

sext (vsetcc X, Y) --> vsetcc (zext X), (zext Y) -- (when the zexts are free and a bunch of other conditions)
We have a couple of similar folds to this already for vector selects, but this pattern slips through because it is only a setcc.

The tests are based on the motivating case from:
https://llvm.org/PR50055
...but we need extra logic to get that example, so I've left that as a TODO for now.


https://reviews.llvm.org/D103280

Files:
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/test/CodeGen/X86/sext-vsetcc.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103280.348361.patch
Type: text/x-patch
Size: 8992 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210527/93d26aae/attachment.bin>


More information about the llvm-commits mailing list