[llvm] CodeGen: Add ISD::AssertNoFPClass (PR #135946)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 21 03:42:26 PDT 2025
================
@@ -10,3 +10,13 @@ entry:
%cond = tail call float @llvm.maximumnum.f32(float %a, float %b)
ret float %cond
}
+
+define <4 x float> @fv4f32(<4 x float> nofpclass(nan) %a, <4 x float> nofpclass(nan) %b) {
+; CHECK-LABEL: fv4f32:
+; CHECK: // %bb.0: // %entry
+; CHECK-NEXT: fmaxnm v0.4s, v0.4s, v1.4s
+; CHECK-NEXT: ret
+entry:
+ %c = call <4 x float> @llvm.maximumnum.v4f32(<4 x float> %a, <4 x float> %b)
+ ret <4 x float> %c
+}
----------------
arsenm wrote:
also test aggregate case, e.g.
```
define { float, float } @struct({ float, float } nofpclass(nan) %a) {
ret {float, float} %a
}
```
https://github.com/llvm/llvm-project/pull/135946
More information about the llvm-commits
mailing list