[PATCH] D135022: [GlobalISel] Implement undef combines for funnel shifts

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 1 15:13:41 PDT 2022


paquette created this revision.
paquette added reviewers: aemerson, arsenm, jroelofs.
Herald added subscribers: hiraditya, rovka.
Herald added a project: All.
paquette requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

AFAICT the way SDAG does this is:

  fshl (x, y, undef) -> x for scalars
  fshr (x, y, undef) -> y for scalars
  fshl (x, y, undef) -> undef for vectors
  fshr (x, y, undef) -> undef for vectors

https://gcc.godbolt.org/z/xq9PYfhYh

This should fix https://github.com/llvm/llvm-project/issues/57256


https://reviews.llvm.org/D135022

Files:
  llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
  llvm/include/llvm/Target/GlobalISel/Combine.td
  llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
  llvm/test/CodeGen/AArch64/GlobalISel/combine-undef-funnel-shift-amt.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135022.464525.patch
Type: text/x-patch
Size: 5577 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221001/a4466757/attachment.bin>


More information about the llvm-commits mailing list