[PATCH] D154203: llvm-reduce: Add broken testcase that shows uselistorder problem

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 30 04:49:50 PDT 2023


arsenm created this revision.
arsenm added reviewers: aeubanks, regehr, lebedev.ri, fhahn.
Herald added subscribers: ormris, StephenFan, thopre.
Herald added a project: All.
arsenm requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

I've been trying to track down this problem for a while and finally
found a small enough reproducer for a test. Reductions sometimes
produce text IR which does not parse, with errors such as

      

"error: wrong number of indexes, expected 9"

      

This appears to not happen with bitcode reduction, as the bitcode
reader seems to silently discard uselistorder when the sizes don't
match. I believe this is caused by dangling constants in the
LLVMContext, which is currently recycled between different reductions.


https://reviews.llvm.org/D154203

Files:
  llvm/test/tools/llvm-reduce/Inputs/llvm-as-and-filecheck.py
  llvm/test/tools/llvm-reduce/uselistorder-invalid-ir-output.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154203.536181.patch
Type: text/x-patch
Size: 3455 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230630/74c95ad9/attachment.bin>


More information about the llvm-commits mailing list