[llvm] [Xtensa] Support 'f' Inline Assembly Constraint (PR #202345)
Andrei Safronov via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 25 01:26:18 PDT 2026
================
@@ -0,0 +1,23 @@
+; RUN: llc -mtriple=xtensa -mcpu=esp32 -verify-machineinstrs < %s \
+; RUN: | FileCheck -check-prefix=Xtensa %s
+
+
+ at gf = external global float
+
+define float @constraint_f_float(float %a) nounwind {
+; Xtensa-LABEL: constraint_f_float:
+; Xtensa: # %bb.0:
+; Xtensa-NEXT: entry a1, 32
+; Xtensa-NEXT: wfr f8, a2
+; Xtensa-NEXT: l32r a8, .LCPI0_0
+; Xtensa-NEXT: lsi f9, a8, 0
+; Xtensa-NEXT: #APP
+; Xtensa-NEXT: add.s f8, f8, f9
+; Xtensa-NEXT: #NO_APP
+; Xtensa-NEXT: rfr a2, f8
+; Xtensa-NEXT: retw
+ %1 = load float, float* @gf
----------------
andreisfr wrote:
I suggest to use some operands names instead of "%1,%2"
https://github.com/llvm/llvm-project/pull/202345
More information about the llvm-commits
mailing list