[all-commits] [llvm/llvm-project] 918e65: [X86] Immediately call LowerShift from lowerBuildV...

topperc via All-commits all-commits at lists.llvm.org
Thu Jul 9 10:52:12 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 918e6531863187d65895fd68bbc622369b3d79f3
      https://github.com/llvm/llvm-project/commit/918e6531863187d65895fd68bbc622369b3d79f3
  Author: Craig Topper <craig.topper at intel.com>
  Date:   2020-07-09 (Thu, 09 Jul 2020)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    A llvm/test/CodeGen/X86/pr46527.ll

  Log Message:
  -----------
  [X86] Immediately call LowerShift from lowerBuildVectorToBitOp.

If we don't immediately lower the vector shift, the splat
constant vector we created may get turned into a constant pool
load before we get around to lowering the shift. This makes it
a lot more difficult to create a shift by constant. Sometimes we
fail to see through the constant pool at all and end up trying
to lower as if it was a variable shift. This requires custom
handling and may create an unsupported vselect on pre-sse-4.1
targets. Since we're after LegalizeVectorOps we are unable to
legalize the unsupported vselect as that code is in LegalizeVectorOps
rather than LegalizeDAG.

So calling LowerShift immediately ensures that we get see the
splat constant.

Fixes PR46527.

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




More information about the All-commits mailing list