[llvm] r373836 - [FastISel] Copy the inline assembly dialect to the INLINEASM instruction.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 5 16:21:17 PDT 2019
Author: ctopper
Date: Sat Oct 5 16:21:17 2019
New Revision: 373836
URL: http://llvm.org/viewvc/llvm-project?rev=373836&view=rev
Log:
[FastISel] Copy the inline assembly dialect to the INLINEASM instruction.
Fixes PR43575.
Added:
llvm/trunk/test/CodeGen/X86/pr43575.ll
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp?rev=373836&r1=373835&r2=373836&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Sat Oct 5 16:21:17 2019
@@ -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))
Added: llvm/trunk/test/CodeGen/X86/pr43575.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/pr43575.ll?rev=373836&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/pr43575.ll (added)
+++ llvm/trunk/test/CodeGen/X86/pr43575.ll Sat Oct 5 16:21:17 2019
@@ -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
+}
More information about the llvm-commits
mailing list