[llvm] [TargetLowering][SelectionDAG] Exploit nneg Flag in UINT_TO_FP (PR #108931)

Michael Marjieh via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 13 23:25:39 PDT 2024


================
@@ -568,6 +568,16 @@ define float @ull2f(i64 %x) {
   ret float %r
 }
 
+define float @ull2f_nneg(i64 %x) {
+; CHECK-LABEL: ull2f_nneg:
+; CHECK:       # %bb.0:
+; CHECK-NEXT:    cvt.d.l %s0, %s0
+; CHECK-NEXT:    cvt.s.d %s0, %s0
+; CHECK-NEXT:    b.l.t (, %s10)
+  %r = uitofp nneg i64 %x to float
+  ret float %r
+}
+
----------------
mmarjieh wrote:

I can't find a target that has uitofp marked as Expand and sitofp marked as legal or custom on vector types.
I added a strictfp.

https://github.com/llvm/llvm-project/pull/108931


More information about the llvm-commits mailing list