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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292540 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Tim Northover 2017-01-19 23:59:35 +00:00
parent 4b9c663e5c
commit dfbb55fc0c
2 changed files with 13 additions and 0 deletions

View File

@ -581,6 +581,9 @@ bool IRTranslator::translateCall(const User &U, MachineIRBuilder &MIRBuilder) {
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;

View File

@ -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
}