[PATCH] D79827: [x86][CGP] improve sinking of splatted vector shift amount operand

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 12 17:15:34 PDT 2020


spatel created this revision.
spatel added reviewers: craig.topper, RKSimon, dmgreen, efriedma.
Herald added subscribers: hiraditya, mcrosier.
Herald added a project: LLVM.

As-is, this conflicts with D78728 <https://reviews.llvm.org/D78728>, but I'm posting because we get some test diffs from using shouldSinkOperands() instead of the custom CGP code that was in optimizeShuffleVectorInst(). Assuming D78728 <https://reviews.llvm.org/D78728> gets pushed first, I'll update the CGP part of this patch.

The last codegen/IR test diff shows what I suspected could happen - we were sinking all splat shift operands into a loop. But that's not what we want in general; we only want to sink the *shift amount* operand if it is a splat.


https://reviews.llvm.org/D79827

Files:
  llvm/lib/CodeGen/CodeGenPrepare.cpp
  llvm/lib/Target/X86/X86ISelLowering.cpp
  llvm/test/CodeGen/X86/vector-shift-by-select-loop.ll
  llvm/test/Transforms/CodeGenPrepare/X86/vec-shift.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79827.263567.patch
Type: text/x-patch
Size: 23386 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200513/454349c2/attachment.bin>


More information about the llvm-commits mailing list