[PATCH] D125789: Fix release note typo from 6da3d66f

Changwei Zou via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 17 07:23:35 PDT 2022


sheisc created this revision.
Herald added subscribers: pengfei, hiraditya.
Herald added a project: All.
sheisc requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.

The GNU assembler (used in gcc) complains about the syntactic correctness of
the assembly code (at line 9) generated by clang (with the option -no-integrated-as).

We need to delete the white space in "{%k1} {z}" (at line 9) to make both GCC and LLVM happy.

iron at CSE:demo$ cat -n main.s

   1		.text
   2		.file	"main.c"
   3		.globl	main                    # -- Begin function main
   4		.p2align	4, 0x90
   5		.type	main, at function
   6	main:                                   # @main
   7		.cfi_startproc
   8	# %bb.0:                                # %entry
   9		vmovdqu16 %zmm5 , %zmm5 {%k1} {z}
  10		xorl	%eax, %eax
  11		retq
  12	.Lfunc_end0:
  13		.size	main, .Lfunc_end0-main
  14		.cfi_endproc
  15	                                        # -- End function
  16
  17		.ident	"clang"
  18		.section	".note.GNU-stack","", at progbits

iron at CSE:demo$ clang -c main.s -o main.o

iron at CSE:demo$ gcc -c main.s -o main.o

main.s: Assembler messages:
main.s:9: Error: unknown vector operation: ` {z}'


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D125789

Files:
  clang/docs/ReleaseNotes.rst
  llvm/lib/Target/X86/MCTargetDesc/X86InstComments.cpp
  llvm/lib/Target/X86/X86MCInstLower.cpp


Index: llvm/lib/Target/X86/X86MCInstLower.cpp
===================================================================
--- llvm/lib/Target/X86/X86MCInstLower.cpp
+++ llvm/lib/Target/X86/X86MCInstLower.cpp
@@ -1877,7 +1877,7 @@
       CS << " {%" << GetRegisterName(WriteMaskOp.getReg()) << "}";
 
       if (SrcOp1Idx == 2) {
-        CS << " {z}";
+        CS << "{z}";
       }
     }
   }
Index: llvm/lib/Target/X86/MCTargetDesc/X86InstComments.cpp
===================================================================
--- llvm/lib/Target/X86/MCTargetDesc/X86InstComments.cpp
+++ llvm/lib/Target/X86/MCTargetDesc/X86InstComments.cpp
@@ -278,7 +278,7 @@
 
   // MASKZ: zmmX {%kY} {z}
   if (MaskWithZero)
-    OS << " {z}";
+    OS << "{z}";
 }
 
 static bool printFMAComments(const MCInst *MI, raw_ostream &OS,
Index: clang/docs/ReleaseNotes.rst
===================================================================
--- clang/docs/ReleaseNotes.rst
+++ clang/docs/ReleaseNotes.rst
@@ -365,7 +365,7 @@
   of clang; use the ``-fclang-abi-compat=14`` option to get the old mangling.
 - Preprocessor character literals with a ``u8`` prefix are now correctly treated as
   unsigned character literals. This fixes `Issue 54886 <https://github.com/llvm/llvm-project/issues/54886>`_.
-- Stopped allowing constriants on non-template functions to be compliant with
+- Stopped allowing constraints on non-template functions to be compliant with
   dcl.decl.general p4.
 
 C++20 Feature Support


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125789.430052.patch
Type: text/x-patch
Size: 1476 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220517/0eb36439/attachment.bin>


More information about the cfe-commits mailing list