llvm / llvm/llvm-project

update_mc_test_checks should support multiline output from llvm-mc

Open
#175,539 0 comments 0 reactions 2 assignees Claimed by @kosarev View on GitHub
testing-tools
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

Sometimes llvm-mc can generate more than one line of output from assembling a single instruction. It would be nice if `update_mc_test_checks` supported that properly.

Currently after `utils/update_mc_test_checks.py test/MC/AMDGPU/reloc-operands-gfx10.s` I see:
```diff
diff --git a/llvm/test/MC/AMDGPU/reloc-operands-gfx10.s b/llvm/test/MC/AMDGPU/reloc-operands-gfx10.s
index b0fe71ddadb3..cf4b612b4847 100644
--- a/llvm/test/MC/AMDGPU/reloc-operands-gfx10.s
+++ b/llvm/test/MC/AMDGPU/reloc-operands-gfx10.s
@@ -1,31 +1,28 @@
+// NOTE: Assertions have been autogenerated by utils/update_mc_test_checks.py UTC_ARGS: --version 6
// RUN: llvm-mc -triple=amdgcn -mcpu=gfx1010 -show-encoding %s | FileCheck -check-prefix=GFX10 %s

; test vop3 operands

-// GFX10: v_mad_u32_u24 v0, g0@abs32@lo, v0, 12 ; encoding: [0x00,0x00,0x43,0xd5,0xff,0x00,0x32,0x02,A,A,A,A]
-// GFX10-NEXT: ; fixup A - offset: 8, value: g0@abs32@lo, kind: FK_Data_4
+
v_mad_u32_u24 v0, g0@abs32@lo, v0, 12
+// GFX10: v_mad_u32_u24 v0, g0@abs32@lo, v0, 12 ; encoding: [0x00,0x00,0x43,0xd5,0xff,0x00,0x32,0x02,A,A,A,A]; fixup A - offset: 8, value: g0@abs32@lo, kind: FK_Data_4
```
This does not work because it has put the two lines of output into a single CHECK line.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.