[all-commits] [llvm/llvm-project] f490ca: [x86][CGP] enable target hook to sink funnel shift...

RotateRight via All-commits all-commits at lists.llvm.org
Tue May 12 15:40:59 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f490ca76b0ee69dd091a5535dbb948f123a96e2e
      https://github.com/llvm/llvm-project/commit/f490ca76b0ee69dd091a5535dbb948f123a96e2e
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2020-05-12 (Tue, 12 May 2020)

  Changed paths:
    M llvm/include/llvm/CodeGen/TargetLowering.h
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/lib/Target/X86/X86ISelLowering.h
    M llvm/test/CodeGen/X86/vector-fshl-128.ll
    M llvm/test/Transforms/CodeGenPrepare/X86/x86-shuffle-sink.ll

  Log Message:
  -----------
  [x86][CGP] enable target hook to sink funnel shift intrinsic's splatted shift amount

SDAG suffers when it can't see that a funnel operand is a splat value
(due to single-basic-block visibility), so invert the normal loop
hoisting rules to move a splat op closer to its use.

This would be part 1 of an enhancement similar to D63233.

This is needed to re-fix PR37426:
https://bugs.llvm.org/show_bug.cgi?id=37426
...because we got better at canonicalizing IR to funnel shift intrinsics.

The existing CGP code for shift opcodes is likely overstepping what it was
intended to do, so that will be fixed in a follow-up.

Differential Revision: https://reviews.llvm.org/D79718




More information about the All-commits mailing list