[llvm-branch-commits] [llvm] [SelectionDAG] avoid rounding exact f32->bf16 (STRICT_)FP_ROUND (PR #230557)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Oct 9 23:27:02 PDT 2026


================
@@ -26,7 +26,9 @@ define bfloat @return_arg_bf16(bfloat %x) #0 {
 ; FAST_ISEL_AVX512BF16-LABEL: return_arg_bf16:
 ; FAST_ISEL_AVX512BF16:       # %bb.0:
 ; FAST_ISEL_AVX512BF16-NEXT:    vpslld $16, %xmm0, %xmm0
-; FAST_ISEL_AVX512BF16-NEXT:    vcvtneps2bf16 %xmm0, %xmm0
+; FAST_ISEL_AVX512BF16-NEXT:    vmovd %xmm0, %eax
+; FAST_ISEL_AVX512BF16-NEXT:    shrl $16, %eax
----------------
Andarwinux wrote:

Thanks! According to data from uops.info, with #230698, this is not a regression anymore.

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


More information about the llvm-branch-commits mailing list