[PATCH] D104976: [AsmWriter] Properly handle uselistorder for global symbols

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 28 13:47:08 PDT 2021


dexonsmith added inline comments.


================
Comment at: llvm/test/Assembler/uselistorder_global.ll:1
+; RUN: opt -S -preserve-ll-uselistorder < %s | FileCheck %s
+
----------------
Might as well add a `RUN: verify-uselistorder %s`?


================
Comment at: llvm/test/Assembler/uselistorder_global.ll:4
+; CHECK-NOT: uselistorder i32* @g
+; CHECK: uselistorder i32* @g, { 3, 2, 1, 0 }
+; CHECK-NOT: uselistorder i32* @g
----------------
My thought was that this would check that `uselistorder` is emitted in the "right" place:
```
// Check that global uselistorders are emitted at the top-level.
CHECK: define void @func1() {
CHECK: }
CHECK: define void @func2() {
CHECK: }
CHECK: uselistorder @g, {3, 2, 0, 1}
```
Probably not important to test that we can parse the directives in the "old" place. You could probably start with exact textual IR you want to see pop out the other side.

@aeubanks , WDYT?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104976/new/

https://reviews.llvm.org/D104976



More information about the llvm-commits mailing list