[PATCH] D78728: [ARM] Convert floating point splats to integer

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 23 10:16:08 PDT 2020


dmgreen created this revision.
dmgreen added reviewers: samparker, SjoerdMeijer, ostannard, simon_tatham.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls.

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 code. 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 splatto force the type to an integer. There is then some adjustment to the code in shouldSinkOperands to handle the extra bitcasts.


https://reviews.llvm.org/D78728

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78728.259581.patch
Type: text/x-patch
Size: 40495 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200423/bbf1ccf1/attachment-0001.bin>


More information about the llvm-commits mailing list