[PATCH] D105755: [WebAssembly] Custom combines for f32x4.demote_zero_f64x2
Thomas Lively via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 12 10:26:07 PDT 2021
tlively added inline comments.
================
Comment at: clang/include/clang/Basic/BuiltinsWebAssembly.def:192-193
TARGET_BUILTIN(__builtin_wasm_trunc_sat_zero_s_f64x2_i32x4, "V4iV2d", "nc", "simd128")
TARGET_BUILTIN(__builtin_wasm_trunc_sat_zero_u_f64x2_i32x4, "V4UiV2d", "nc", "simd128")
-TARGET_BUILTIN(__builtin_wasm_demote_zero_f64x2_f32x4, "V4fV2d", "nc", "simd128")
----------------
aheejin wrote:
> If these share the same pattern, do we need these builtins?
Hmm, good point. Maybe not. I'll investigate that in a follow up.
================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp:2367
+
+ if (!IsZeroSplat(N->getOperand(1)))
+ return SDValue();
----------------
aheejin wrote:
> Do we not need to check if `N->getOpernad(1)` is a specific type, such as `v2f32` or `v2i32`?
I think that the concat_vectors node ensures that the two sides have the same type, but I'll explicitly check to be safe.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105755/new/
https://reviews.llvm.org/D105755
More information about the llvm-commits
mailing list