[llvm] [AArch64] Remove redundant fmovs when bitcasting from ext/trunc of bitcast (PR #175983)
Amina Chabane via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 14 09:02:50 PST 2026
https://github.com/Amichaxx approved this pull request.
Thank you Kerry, LGTM.
It seems LLVM/GCC generate some funny looking assembly for this [case](https://godbolt.org/z/5nGMnc3ch):
```
define dso_local noundef float @extend_half(_Float16)(half noundef %x) local_unnamed_addr {
entry:
%0 = bitcast half %x to i16
%conv = zext i16 %0 to i32
%1 = bitcast i32 %conv to float
ret float %1
}
```
I believe this can become `fmov h0, h0`.
https://github.com/llvm/llvm-project/pull/175983
More information about the llvm-commits
mailing list