[PATCH] D52528: [X86] Type legalize v2f32 loads by using an f64 load and a scalar_to_vector.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 25 23:48:02 PDT 2018


craig.topper created this revision.
craig.topper added reviewers: RKSimon, spatel.

On 64-bit targets the generic legalize will use an i64 load and a scalar_to_vector for us. But on 32-bit targets i64 isn't legal and the generic legalizer will end up emitting two 32-bit loads. We have DAG combines that try to put those two loads back together with pretty good success.

This patch instead uses f64 to avoid the splitting entirely. I've made it do the same for 64-bit mode for consistency.

There are a few things in here that look like regressions in 32-bit mode, but I believe they bring us closer to the 64-bit mode codegen. And that the 64-bit mode code could be better. I think those issues should be looked at separately.


Repository:
  rL LLVM

https://reviews.llvm.org/D52528

Files:
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/X86/bitcast-int-to-vector.ll
  test/CodeGen/X86/fold-load-vec.ll
  test/CodeGen/X86/merge-consecutive-loads-256.ll
  test/CodeGen/X86/sse-intrinsics-fast-isel.ll
  test/CodeGen/X86/vec_extract-avx.ll
  test/CodeGen/X86/vector-shuffle-128-v4.ll
  test/CodeGen/X86/widen_load-1.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52528.167050.patch
Type: text/x-patch
Size: 9842 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180926/8931b803/attachment.bin>


More information about the llvm-commits mailing list