[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
Fri May 15 03:02:41 PDT 2020
kschwarz updated this revision to Diff 264191.
kschwarz added a comment.
The new check also triggered for memory clobbers, which we already handle.
I've moved the check further down, where we already check that it is an input operand.
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
@@ -424,6 +424,13 @@
}
if (OpInfo.ConstraintType == TargetLowering::C_Memory) {
+
+ if (!OpInfo.isIndirect) {
+ LLVM_DEBUG(dbgs()
+ << "Cannot indirectify memory input operands yet\n");
+ return false;
+ }
+
assert(OpInfo.isIndirect && "Operand must be indirect to be a mem!");
unsigned ConstraintID =
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79955.264191.patch
Type: text/x-patch
Size: 1323 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200515/d4d743ae/attachment.bin>
More information about the llvm-commits
mailing list