[llvm] [InstCombine] Fold `fpto{s|u}i non-norm` to zero (PR #85569)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 18 05:54:31 PDT 2024
================
@@ -347,3 +347,64 @@ define double @masked_uint_to_fpext3(i32 %x) {
%r = fpext float %f to double
ret double %r
}
+
+define i32 @fptosi_nonnorm(float nofpclass(norm) %x) {
+; CHECK-LABEL: @fptosi_nonnorm(
+; CHECK-NEXT: ret i32 0
+;
+ %ret = fptosi float %x to i32
+ ret i32 %ret
+}
+
+define i32 @fptoui_nonnorm(float nofpclass(pnorm) %x) {
----------------
arsenm wrote:
check a nnorm source for ui/si
https://github.com/llvm/llvm-project/pull/85569
More information about the llvm-commits
mailing list