[llvm] [AArch64] Use pattern to select bf16 fpextend (PR #137212)

David Green via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 27 08:50:09 PDT 2025


davemgreen wrote:

As per #118966 was hoping the opposite would be better. I can see the advantage if there at fast-math fpexts/fptruncs that can be removed, but I was hoping that we could lower the extends/round so that the shifts and whatnot can be optimized nicely as they should be. Otherwise you miss fairly basic codegen opportunities.

I am mostly against patterns that produce multiple output instructions, especially anything that is a cross-register-bank copy. `SUBREG_TO_REG` and `EXTRACT_SUBREG` are fine as they don't produce instructions. But I'm not sure if `(i32 (SUBREG_TO_REG (i32 0), (bf16 FPR16:$Rn), hsub))` is really valid.

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


More information about the llvm-commits mailing list