Replace the clang builtin function and LLVM intrinsic for
f32x4.demote_zero_f64x2 with combines from normal SDNodes. Also add missing
combines for i32x4.trunc_sat_zero_f64x2_{s,u}, which share the same pattern.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/include/clang/Basic/BuiltinsWebAssembly.def | ||
---|---|---|
192–193 | If these share the same pattern, do we need these builtins? | |
llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp | ||
2367 | Do we not need to check if N->getOpernad(1) is a specific type, such as v2f32 or v2i32? | |
2410 | Same here; do we not need to check if Concat.getOpernad(1) is v2f64? |
- Check types of splats as well
clang/include/clang/Basic/BuiltinsWebAssembly.def | ||
---|---|---|
192–193 | Hmm, good point. Maybe not. I'll investigate that in a follow up. | |
llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp | ||
2367 | I think that the concat_vectors node ensures that the two sides have the same type, but I'll explicitly check to be safe. |
clang/include/clang/Basic/BuiltinsWebAssembly.def | ||
---|---|---|
192–193 | Ah, the reason we can't remove these builtins is because there is no good target-independent way to represent the saturating behavior of the float-to-int conversion. |
If these share the same pattern, do we need these builtins?