[llvm-branch-commits] [llvm] DAG: Remove special case ldexp libcall recognition (PR #241467)
Matt Arsenault via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Nov 11 12:07:03 PST 2026
================
@@ -9,15 +9,17 @@ define float @call_ldexpf(float %a, i32 %b) nounwind {
;
; CHECK-WIN-LABEL: call_ldexpf:
; CHECK-WIN: # %bb.0:
-; CHECK-WIN-NEXT: subl $8, %esp
-; CHECK-WIN-NEXT: flds {{[0-9]+}}(%esp)
+; CHECK-WIN-NEXT: subl $16, %esp
; CHECK-WIN-NEXT: movl {{[0-9]+}}(%esp), %eax
; CHECK-WIN-NEXT: movl %eax, {{[0-9]+}}(%esp)
-; CHECK-WIN-NEXT: fstps (%esp)
-; CHECK-WIN-NEXT: calll _ldexpf
-; CHECK-WIN-NEXT: addl $8, %esp
+; CHECK-WIN-NEXT: flds {{[0-9]+}}(%esp)
+; CHECK-WIN-NEXT: fstpl (%esp)
+; CHECK-WIN-NEXT: calll _ldexp
+; CHECK-WIN-NEXT: fstps {{[0-9]+}}(%esp)
+; CHECK-WIN-NEXT: flds {{[0-9]+}}(%esp)
+; CHECK-WIN-NEXT: addl $16, %esp
; CHECK-WIN-NEXT: retl
- %result = call float @ldexpf(float %a, i32 %b)
+ %result = call float @llvm.ldexp.f32.i32(float %a, i32 %b)
----------------
arsenm wrote:
Windows doesn't have the float version so it needs to promote to double
https://github.com/llvm/llvm-project/pull/241467
More information about the llvm-branch-commits
mailing list