[all-commits] [llvm/llvm-project] 40af48: [WebAssembly] Optimize splats of bitcasted vectors

Thomas Lively via All-commits all-commits at lists.llvm.org
Fri May 15 12:14:22 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 40af48101b1c65693dee289a960c381e0a993238
      https://github.com/llvm/llvm-project/commit/40af48101b1c65693dee289a960c381e0a993238
  Author: Thomas Lively <tlively at google.com>
  Date:   2020-05-15 (Fri, 15 May 2020)

  Changed paths:
    M llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
    M llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.h
    A llvm/test/CodeGen/WebAssembly/simd-shuffle-bitcast.ll

  Log Message:
  -----------
  [WebAssembly] Optimize splats of bitcasted vectors

Summary:
This new custom DAG combine fixes a codegen issue with the
wasm_simd128.h intrinsics. Clang lowers the

  return (v128_t)(__f32x4){__a, __a, __a, __a};

body of f32x4_splat to a splat shuffle of a bitcasted vector, as seen
in the new simd-shuffle-bitcast.ll test. The bitcast interfered with
the target-independent DAG combine that combines splat shuffles into
BUILD_VECTOR nodes, so this patch introduces a new custom DAG combine
to hoist the bitcast out of the shuffle, allowing the
target-independent combine to work as intended.

Reviewers: aheejin, dschuff

Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits

Tags: #llvm

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




More information about the All-commits mailing list