[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
Loading
Please register or sign in to comment