[llvm] [WebAssembly] Support f16x8.demote_f32x4_zero (PR #193564)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 22 11:51:47 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
index 8f23d2a9b..6da40a7bd 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
@@ -3153,7 +3153,8 @@ performVectorTruncZeroCombine(SDNode *N, TargetLowering::DAGCombinerInfo &DCI) {
//
// Or this:
//
- // (concat_vectors ({v2f32, v4f16} (fp_round ({v2f64, v4f32} $x))), ({v2f32, v4f16} (splat 0)))
+ // (concat_vectors ({v2f32, v4f16} (fp_round ({v2f64, v4f32} $x))),
+ // ({v2f32, v4f16} (splat 0)))
//
// into ({f32x4, f16x8}.demote_zero_{f64x2, f32x4} $x).
EVT ResVT;
@@ -3209,7 +3210,8 @@ performVectorTruncZeroCombine(SDNode *N, TargetLowering::DAGCombinerInfo &DCI) {
//
// Or this:
//
- // ({v4f32, v8f16} (fp_round (concat_vectors $x, ({v2f64, v4f32} (splat 0)))))
+ // ({v4f32, v8f16} (fp_round (concat_vectors $x, ({v2f64, v4f32} (splat
+ // 0)))))
//
// into ({f32x4, f16x8}.demote_zero_{f64x2, f32x4} $x).
EVT ResVT;
@@ -3239,8 +3241,10 @@ performVectorTruncZeroCombine(SDNode *N, TargetLowering::DAGCombinerInfo &DCI) {
return SDValue();
if (ConversionOp == ISD::FP_ROUND) {
- if (!((ConcatVT == MVT::v4f64 && SourceVT == MVT::v2f64 && ResVT == MVT::v4f32) ||
- (ConcatVT == MVT::v8f32 && SourceVT == MVT::v4f32 && ResVT == MVT::v8f16)))
+ if (!((ConcatVT == MVT::v4f64 && SourceVT == MVT::v2f64 &&
+ ResVT == MVT::v4f32) ||
+ (ConcatVT == MVT::v8f32 && SourceVT == MVT::v4f32 &&
+ ResVT == MVT::v8f16)))
return SDValue();
} else {
if (ConcatVT != MVT::v4f64 || SourceVT != MVT::v2f64 || ResVT != MVT::v4i32)
``````````
</details>
https://github.com/llvm/llvm-project/pull/193564
More information about the llvm-commits
mailing list