[PATCH] D79955: [GlobalISel][InlineAsm] Add early return for memory inputs that need to be indirectified
Konstantin Schwarz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 14 14:43:44 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG887dfeec53ad: [GlobalISel][InlineAsm] Add early return for memory inputs that need to be… (authored by kschwarz).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79955/new/
https://reviews.llvm.org/D79955
Files:
llvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp
llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
Index: llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
===================================================================
--- llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
+++ llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
@@ -210,3 +210,12 @@
}
attributes #0 = { "target-features"="+strict-align" }
+
+; FALLBACK-WITH-REPORT-ERR: remark: <unknown>:0:0: unable to translate instruction: call
+; FALLBACK-WITH-REPORT-ERR: warning: Instruction selection used fallback path for direct_mem
+; FALLBACK-WITH-REPORT-OUT-LABEL: direct_mem
+define void @direct_mem(i32 %x, i32 %y) {
+entry:
+ tail call void asm sideeffect "", "imr,imr,~{memory}"(i32 %x, i32 %y)
+ ret void
+}
Index: llvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp
===================================================================
--- llvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp
+++ llvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp
@@ -306,6 +306,12 @@
// Compute the constraint code and ConstraintType to use.
computeConstraintToUse(TLI, OpInfo);
+ if (OpInfo.ConstraintType == TargetLowering::C_Memory &&
+ !OpInfo.isIndirect) {
+ LLVM_DEBUG(dbgs() << "Cannot indirectify memory input operands yet\n");
+ return false;
+ }
+
// The selected constraint type might expose new sideeffects
ExtraInfo.update(OpInfo);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79955.264102.patch
Type: text/x-patch
Size: 1365 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200514/5641913b/attachment.bin>
More information about the llvm-commits
mailing list