[PATCH] D122582: StackMap: Fix assertion on undef operands for anyregc

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 28 06:19:52 PDT 2022


arsenm created this revision.
arsenm added reviewers: dantrushin, reames, skatkov.
Herald added subscribers: pengfei, hiraditya.
Herald added a project: All.
arsenm requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

There is some special handling of undef operands here which I don't
understand. For some reason a special offset value is used and the
type is changed to Constant, and then later was replaced with
ConstantIndex based on the dummy offset value. This also seems to be
inconsistently treated in the existing code. See the test changes in
statepoint-fixup-undef.mir since this stops the use of the constant
pool with the special offset in one of the run lines. I don't
understand why an undef operand would end up being encoded as anything
in the final binary.

      

Also have no idea if the new test checks are meaningful.

      

This avoids test failures in a future patch which starts discarding
liveness information on register allocation failures.

      

I also noticed we seem to be lacking verification for PATCHPOINT's
operand restrictions. In particular you hit assertions if the operand
for the number of operands isn't correct.


https://reviews.llvm.org/D122582

Files:
  llvm/include/llvm/CodeGen/StackMaps.h
  llvm/lib/CodeGen/StackMaps.cpp
  llvm/test/CodeGen/X86/stackmap-undef-operand-anyregcc.mir
  llvm/test/CodeGen/X86/statepoint-fixup-undef.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122582.418567.patch
Type: text/x-patch
Size: 5509 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220328/08dbcda7/attachment.bin>


More information about the llvm-commits mailing list