[PATCH] D105254: [RISCV] Support machine constraint "S"

Jessica Clarke via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 30 18:20:59 PDT 2021


jrtc27 added a comment.

Hm, AArch64 handles ExternalSymbolSDNode too, but I don't see how you could ever end up with one...



================
Comment at: llvm/test/CodeGen/RISCV/inline-asm-S-constraint.ll:7
+
+; Function Attrs: nofree nosync nounwind readnone
+define dso_local i8* @constraint_S() #1 {
----------------
These should be stripped


================
Comment at: llvm/test/CodeGen/RISCV/inline-asm-S-constraint.ll:8
+; Function Attrs: nofree nosync nounwind readnone
+define dso_local i8* @constraint_S() #1 {
+; RV32-LABEL: constraint_S:
----------------
`#1` doesn't exist


================
Comment at: llvm/test/CodeGen/RISCV/inline-asm-S-constraint.ll:24
+; RV64-NEXT:    ret
+entry:
+  %0 = tail call i8* asm "lui $0, %hi($1)\0Aaddi $0,$0,%lo($1)", "=r,S"(i32* nonnull @var)
----------------
Label isn't needed


================
Comment at: llvm/test/CodeGen/RISCV/inline-asm-S-constraint.ll:25
+entry:
+  %0 = tail call i8* asm "lui $0, %hi($1)\0Aaddi $0,$0,%lo($1)", "=r,S"(i32* nonnull @var)
+  ret i8* %0
----------------
for consistency


================
Comment at: llvm/test/CodeGen/RISCV/inline-asm-S-constraint.ll:53
+
+L1:                                               ; preds = %entry
+  %0 = tail call i8* asm "lui $0, %hi($1)\0Aaddi $0,$0,%lo($1)", "=r,S"(i8* blockaddress(@constraint_S_label, %L1))
----------------
Don't need the comment


================
Comment at: llvm/test/CodeGen/RISCV/inline-asm-S-constraint.ll:54
+L1:                                               ; preds = %entry
+  %0 = tail call i8* asm "lui $0, %hi($1)\0Aaddi $0,$0,%lo($1)", "=r,S"(i8* blockaddress(@constraint_S_label, %L1))
+  ret i8* %0
----------------
Ditto


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105254/new/

https://reviews.llvm.org/D105254



More information about the cfe-commits mailing list