[llvm] [AArch64] Removed redundant FMOV instruction for truncstores of f64/f32 via bitcast to i64/i32/i8. (PR #149997)
Amina Chabane via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 18 07:51:17 PDT 2025
================
@@ -0,0 +1,60 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+; RUN: llc -mtriple=aarch64-unknown-linux-gnu -mattr=+fp-armv8,+fullfp16 < %s | FileCheck %s
+
+
+define void @_Z10store_f64i32Pjd(ptr %n, double noundef %x){
+; CHECK-LABEL: _Z10store_f64i32Pjd:
+; CHECK: // %bb.0: // %entry
+; CHECK-NEXT: str s0, [x0]
+; CHECK-NEXT: ret
+entry:
+ %0 = bitcast double %x to i64
+ %conv = trunc i64 %0 to i32
+ store i32 %conv, ptr %n, align 4
+ ret void
+}
+
+define void @_Z9store_f64i16Ptd(ptr %n, double noundef %x){
----------------
Amichaxx wrote:
Done in latest commit. Added i64 to f32 and i32 to f16.
https://github.com/llvm/llvm-project/pull/149997
More information about the llvm-commits
mailing list