[FastISel] Copy the inline assembly dialect to the INLINEASM instruction.

Fixes PR43575.

llvm-svn: 373836
This commit is contained in:
Craig Topper 2019-10-05 23:21:17 +00:00
parent 8815be04ec
commit 2decdf42b9
2 changed files with 15 additions and 0 deletions

View File

@ -1303,6 +1303,7 @@ bool FastISel::selectCall(const User *I) {
ExtraInfo |= InlineAsm::Extra_HasSideEffects;
if (IA->isAlignStack())
ExtraInfo |= InlineAsm::Extra_IsAlignStack;
ExtraInfo |= IA->getDialect() * InlineAsm::Extra_AsmDialect;
BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DbgLoc,
TII.get(TargetOpcode::INLINEASM))

View File

@ -0,0 +1,14 @@
; RUN: llc < %s -mtriple=x86_64-apple-macosx10.14.0 -O0 | FileCheck %s
define void @exit(i32 %status)
; CHECK-LABEL: exit:
; CHECK: ## %bb.0:
; CHECK: ## InlineAsm Start
; CHECK: movq $60, %rax
; CHECK: syscall
; CHECK: ## InlineAsm End
; CHECK: retq
{
call void asm sideeffect inteldialect "mov rax, 60; syscall", ""()
ret void
}