[llvm] [X86] Lowering of load atomic float via cast (PR #117189)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 2 15:57:17 PST 2024


================
@@ -0,0 +1,38 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+; RUN: llc < %s --mtriple=x86_64 | FileCheck %s
+
+define float @load_atomic_float(ptr %src) {
+; CHECK-LABEL: load_atomic_float:
+; CHECK:       # %bb.0:
+; CHECK-NEXT:    movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
+; CHECK-NEXT:    retq
+  %ret = load atomic float, ptr %src acquire, align 4
+  ret float %ret
+}
+
+define <1 x float> @load_atomic_vector_float1(ptr %src) {
+; CHECK-LABEL: load_atomic_vector_float1:
+; CHECK:       # %bb.0:
+; CHECK-NEXT:    movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
+; CHECK-NEXT:    retq
----------------
arsenm wrote:

Focus on one thing at a time, only handle scalar FP cases in this PR

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


More information about the llvm-commits mailing list