Index: test/CodeGen/asm.c =================================================================== --- test/CodeGen/asm.c (revision 161369) +++ test/CodeGen/asm.c (working copy) @@ -220,3 +220,11 @@ void t26 (__m256i *p) { __asm__ volatile("vmovaps %0, %%ymm0" :: "m" (*(__m256i*)p) : "ymm0"); } + +// Check to make sure AT&T syntax attribute is emitted. +void t27(void) { + asm volatile("nop"); +// CHECK: @t27 +// CHECK: call void asm sideeffect "nop" +// CHECK: nounwind attdialect +} Index: lib/CodeGen/CGStmt.cpp =================================================================== --- lib/CodeGen/CGStmt.cpp (revision 161369) +++ lib/CodeGen/CGStmt.cpp (working copy) @@ -1633,6 +1633,7 @@ S.isVolatile() || S.getNumOutputs() == 0); llvm::CallInst *Result = Builder.CreateCall(IA, Args); Result->addAttribute(~0, llvm::Attribute::NoUnwind); + Result->addAttribute(~0, llvm::Attribute::ATTDialect); // Slap the source location of the inline asm into a !srcloc metadata on the // call.