[all-commits] [llvm/llvm-project] fa1525: [ARM] Convert floating point splats to integer

David Green via All-commits all-commits at lists.llvm.org
Wed May 13 07:25:43 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: fa15255d8af53126bbcb017f2fb6f9961e8574df
      https://github.com/llvm/llvm-project/commit/fa15255d8af53126bbcb017f2fb6f9961e8574df
  Author: David Green <david.green at arm.com>
  Date:   2020-05-13 (Wed, 13 May 2020)

  Changed paths:
    M llvm/include/llvm/CodeGen/TargetLowering.h
    M llvm/lib/CodeGen/CodeGenPrepare.cpp
    M llvm/lib/Target/ARM/ARMISelLowering.cpp
    M llvm/lib/Target/ARM/ARMISelLowering.h
    M llvm/test/CodeGen/Thumb2/mve-float16regloops.ll
    M llvm/test/CodeGen/Thumb2/mve-float32regloops.ll
    M llvm/test/CodeGen/Thumb2/mve-fma-loops.ll
    M llvm/test/CodeGen/Thumb2/mve-intrinsics/dup.ll
    M llvm/test/CodeGen/Thumb2/mve-intrinsics/ternary.ll
    M llvm/test/CodeGen/Thumb2/mve-intrinsics/vaddq.ll
    M llvm/test/CodeGen/Thumb2/mve-intrinsics/vmulq.ll
    M llvm/test/CodeGen/Thumb2/mve-intrinsics/vsubq.ll
    M llvm/test/CodeGen/Thumb2/mve-postinc-lsr.ll
    M llvm/test/CodeGen/Thumb2/mve-pred-threshold.ll
    M llvm/test/CodeGen/Thumb2/mve-vldst4.ll

  Log Message:
  -----------
  [ARM] Convert floating point splats to integer

Under MVE a vdup will always take a gpr register, not a floating point
value. During DAG combine we convert the types to a bitcast to an
integer in an attempt to fold the bitcast into other instructions. This
is OK, but only works inside the same basic block. To do the same trick
across a basic block boundary we need to convert the type in
codegenprepare, before the splat is sunk into the loop.

This adds a convertSplatType function to codegenprepare to do that,
putting bitcasts around the splat to force the type to an integer. There
is then some adjustment to the code in shouldSinkOperands to handle the
extra bitcasts.

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




More information about the All-commits mailing list