[WebAssembly] More convert_low and promote_low codegen
authorThomas Lively <tlively@google.com>
Thu, 19 Aug 2021 22:37:12 +0000 (15:37 -0700)
committerThomas Lively <tlively@google.com>
Thu, 19 Aug 2021 22:37:12 +0000 (15:37 -0700)
commitfd0557dbf13198ddd6a17bd120a7b2bb97bfbd0a
treea18ae7071c6736e23629cfc4554daa4c8f815890
parentb311a040ef9cda6d52fdfdd4968f2dc59ccf596e
[WebAssembly] More convert_low and promote_low codegen

The convert_low and promote_low instructions can widen the lower two lanes of a
four-lane vector, but we were previously scalarizing patterns that widened lanes
besides the low two lanes. The commit adds a shuffle to move the widened lanes
into the low lane positions so the convert_low and promote_low instructions can
be used instead of scalarizing.

Depends on D108266.

Differential Revision: https://reviews.llvm.org/D108341
llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
llvm/test/CodeGen/WebAssembly/simd-conversions.ll