[llvm] [AArch64] Spare N2I roundtrip when splatting float comparison (PR #141806)
Guy David via llvm-commits
llvm-commits at lists.llvm.org
Sat May 31 13:18:05 PDT 2025
================
@@ -0,0 +1,32 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc < %s -mtriple=aarch64 | FileCheck %s
+
+define <4 x float> @dup32(float %a, float %b) {
+; CHECK-LABEL: dup32:
+; CHECK: // %bb.0: // %entry
+; CHECK-NEXT: fcmgt s0, s0, s1
+; CHECK-NEXT: dup v0.4s, v0.s[0]
+; CHECK-NEXT: ret
+entry:
+ %0 = fcmp ogt float %a, %b
----------------
guy-david wrote:
FP16 is a bit more difficult because the input `select_cc` is legalized and has a `i32` result while the comparison is between a pair of `f16`, and then the none of the `fcmgt`, `fcmeq`, etc. match the pattern.
https://github.com/llvm/llvm-project/pull/141806
More information about the llvm-commits
mailing list