[llvm] r292540 - AArch64: fall back to DAG ISel for inline assembly.
Tim Northover via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 19 15:59:35 PST 2017
Author: tnorthover
Date: Thu Jan 19 17:59:35 2017
New Revision: 292540
URL: http://llvm.org/viewvc/llvm-project?rev=292540&view=rev
Log:
AArch64: fall back to DAG ISel for inline assembly.
We can't currently handle "calls" to inlineasm strings so it's better to let
the DAG handle it than generate rubbish.
Added:
llvm/trunk/test/CodeGen/AArch64/GlobalISel/inline-asm.ll
Modified:
llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp
Modified: llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp?rev=292540&r1=292539&r2=292540&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp (original)
+++ llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp Thu Jan 19 17:59:35 2017
@@ -581,6 +581,9 @@ bool IRTranslator::translateCall(const U
auto TII = MF->getTarget().getIntrinsicInfo();
const Function *F = CI.getCalledFunction();
+ if (CI.isInlineAsm())
+ return false;
+
if (!F || !F->isIntrinsic()) {
unsigned Res = CI.getType()->isVoidTy() ? 0 : getOrCreateVReg(CI);
SmallVector<unsigned, 8> Args;
Added: llvm/trunk/test/CodeGen/AArch64/GlobalISel/inline-asm.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AArch64/GlobalISel/inline-asm.ll?rev=292540&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/AArch64/GlobalISel/inline-asm.ll (added)
+++ llvm/trunk/test/CodeGen/AArch64/GlobalISel/inline-asm.ll Thu Jan 19 17:59:35 2017
@@ -0,0 +1,10 @@
+; RUN: llc -mtriple=aarch64 -global-isel -global-isel-abort=2 %s -o - | FileCheck %s
+
+; CHECK-LABEL: test_asm:
+; CHECK: {{APP|InlineAsm Start}}
+; CHECK: mov x0, x0
+; CHECK: {{NO_APP|InlineAsm End}}
+define void @test_asm() {
+ call void asm sideeffect "mov x0, x0", ""()
+ ret void
+}
More information about the llvm-commits
mailing list