[llvm] [X86] Combine LRINT/LLRINT and TRUNC when nuw/nsw (PR #126217)
    Phoebe Wang via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Feb  7 06:32:53 PST 2025
    
    
  
================
@@ -183,6 +183,94 @@ entry:
   ret i64 %0
 }
 
+define i32 @combine_f32_trunc(float %x) nounwind {
+; SSE-LABEL: combine_trunc:
+; SSE:       # %bb.0: # %entry
+; SSE-NEXT:    cvtss2si %xmm0, %eax
+; SSE-NEXT:    retq
+;
+; AVX-LABEL: combine_trunc:
+; AVX:       # %bb.0: # %entry
+; AVX-NEXT:    vcvtss2si %xmm0, %eax
+; AVX-NEXT:    retq
----------------
phoebewang wrote:
Oh, I copy&pasted them. Done, thanks!
https://github.com/llvm/llvm-project/pull/126217
    
    
More information about the llvm-commits
mailing list