https://bugs.llvm.org/show_bug.cgi?id=50232

            Bug ID: 50232
           Summary: [SIMD] shuffle + convert doesn't lower to
                    f64x2.promote_low_f32x4
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: WebAssembly
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

LLVM misses an opportunity to emit f64x2.promote_low_f32x4.  Instead, it
extracts each lane, runs f64.promote_f32 on the extracted value, then inserts
the result.

Test case:

#include <wasm_simd128.h>

v128_t
alt_f64x2_promote_low_f32x4(v128_t __a) {
  return (v128_t)
    __builtin_convertvector(
      __builtin_shufflevector((__f32x4) __a, (__f32x4) __a, 0, 1),
      __f64x2
    );
  // return (v128_t)__builtin_wasm_promote_low_f32x4_f64x2((__f32x4)__a);
}

On Compiler Explorer: https://godbolt.org/z/xx68PfoTd

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to